diff --git a/.github/workflows/create_release.yml b/.github/workflows/create_release.yml index c0b75dd8..381a96ac 100644 --- a/.github/workflows/create_release.yml +++ b/.github/workflows/create_release.yml @@ -3,7 +3,7 @@ name: Create CLI Release on: pull_request: branches: - - main + - release types: [closed] jobs: @@ -25,3 +25,28 @@ jobs: GITHUB_TOKEN: ${{ secrets.CODECOV_RELEASE_PAT }} run: | gh release create v${{ steps.get-release-vars.outputs.release_version }} --title "Release v${{ steps.get-release-vars.outputs.release_version }}" --notes "Autogenerated for v${{ steps.get-release-vars.outputs.release_version }}. Created for ${{ github.event.pull_request.html_url }}" --generate-notes --target ${{ github.event.pull_request.head.sha }} + + update-main: + permissions: + contents: write + id-token: write + needs: create-release + name: Update main + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Import GPG key + id: import-gpg + uses: crazy-max/ghaction-import-gpg@v6 + with: + gpg_private_key: ${{ secrets.RELEASER_GPG_PRIVATE_KEY }} + git_user_signingkey: true + git_commit_gpgsign: true + git_config_global: true + + - name: Update main and push + run: | + git merge release + git push origin main -f diff --git a/.github/workflows/create_release_pr.yml b/.github/workflows/create_release_pr.yml index 725db89e..218241c5 100644 --- a/.github/workflows/create_release_pr.yml +++ b/.github/workflows/create_release_pr.yml @@ -41,9 +41,9 @@ jobs: with: github_token: ${{ secrets.GH_RELEASE_TOKEN }} head: release/${{ github.event.inputs.versionName }} - base: main + base: release title: Release ${{ github.event.inputs.versionName }} reviewers: ${{ github.event.issue.user.login }} body: | Release PR for ${{ github.event.inputs.versionName }} - I've updated the version name and committed: ${{ steps.make-commit.outputs.commit }}. \ No newline at end of file + I've updated the version name and committed: ${{ steps.make-commit.outputs.commit }}.