Skip to content

Commit

Permalink
Refactor release workflow to be "partially" reusable
Browse files Browse the repository at this point in the history
  • Loading branch information
Danil-Grigorev authored and salasberryfin committed Oct 26, 2023
1 parent 7f52ee3 commit bc71982
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ jobs:
name: Create helm release
needs: [build-push-services]
runs-on: ubuntu-latest
permissions:
contents: write # Allow to create a release.
env:
TAG: ${{ github.ref_name }}
PROD_ORG: rancher-sandbox
Expand All @@ -57,21 +59,17 @@ jobs:
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
- name: Package operator chart
run: RELEASE_TAG=${GITHUB_REF##*/} CHART_PACKAGE_DIR=${RELEASE_DIR} REGISTRY=${{ env.PROD_REGISTRY }} ORG=${{ env.PROD_ORG }} make release

- name: Install chart-releaser
uses: helm/chart-releaser-action@v1.5.0
with:
install_only: true

- name: Prepare environment for the chart releaser
run: |
echo "CR_OWNER=$(cut -d '/' -f 1 <<< $GITHUB_REPOSITORY)" >> $GITHUB_ENV
echo "CR_GIT_REPO=$(cut -d '/' -f 2 <<< $GITHUB_REPOSITORY)" >> $GITHUB_ENV
rm -rf .cr-index
mkdir -p .cr-index
- name: Run chart-releaser upload
run: cr upload --skip-existing -c "$(git rev-parse HEAD)" --generate-release-notes --release-name-template "${{ env.TAG }}" --make-release-latest=false

- name: Run chart-releaser index
run: cr index --push --release-name-template "${{ env.TAG }}"

0 comments on commit bc71982

Please sign in to comment.