Manual Prepare Release #20
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Manual Prepare Release | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: "Version to release." | |
| required: true | |
| jobs: | |
| release-to-main: | |
| runs-on: ubuntu-latest | |
| environment: release | |
| permissions: | |
| contents: write | |
| id-token: write | |
| packages: write | |
| pull-requests: write | |
| issues: write | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v4 | |
| with: | |
| ssh-key: ${{ secrets.VERSION_BUMP_DEPLOY_KEY }} | |
| persist-credentials: true | |
| fetch-depth: 0 # fetch the whole repo history | |
| - name: Verify release notes exist | |
| run: test -f "helm/docs/releases/${{ github.event.inputs.version }}.md" | |
| - name: Setup Git | |
| run: | | |
| git config --global user.name "github-actions[bot]" | |
| git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
| - name: Update image version in Helm chart | |
| run: | | |
| sed -ri "s/^( +tag): +[^ ]+ (# <- Software release corresponding to this chart version.)$/\1: ${{ github.event.inputs.version }} \2/" helm/values.yaml | |
| make helm-generate-tests | |
| git add helm/values.yaml tests/helm/template/*.yaml | |
| git commit -m "Update image version in Helm chart to ${{ github.event.inputs.version }}" | |
| - name: Checkout main branch | |
| run: git checkout main | |
| - name: Merge develop into main | |
| run: git merge --ff-only develop | |
| - name: Tag release | |
| run: git tag -a "v${{ github.event.inputs.version }}" -m "Release ${{ github.event.inputs.version }}" | |
| - name: Push changes to main | |
| run: git push --atomic origin develop main "v${{ github.event.inputs.version }}" | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| tag_name: v${{ github.event.inputs.version }} | |
| body_path: helm/docs/releases/${{ github.event.inputs.version }}.md | |
| prerelease: ${{ contains(github.event.inputs.version, '-beta-') || contains(github.event.inputs.version, '-rc-') }} | |
| draft: true |