From 858b6b112af18351728ed6d93a98d45523e507c7 Mon Sep 17 00:00:00 2001 From: Tchoupinax Date: Sun, 22 Dec 2024 14:55:50 +0100 Subject: [PATCH] Separate main tag process from changelog generation process (#26) --- .github/workflows/main-tag.yml | 7 +----- .github/workflows/tag-update-major-tag.yml | 27 ++++++++++++++++++++++ 2 files changed, 28 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/tag-update-major-tag.yml diff --git a/.github/workflows/main-tag.yml b/.github/workflows/main-tag.yml index 5cb5d28..b1139a7 100644 --- a/.github/workflows/main-tag.yml +++ b/.github/workflows/main-tag.yml @@ -37,9 +37,4 @@ jobs: with: branch: main commit_message: "docs: update CHANGELOG.md for ${{ github.ref_name }} [skip ci]" - file_pattern: CHANGELOG.md - - - name: Update major tag to ${{ github.ref_name }} - uses: actions/publish-action@v0.3.0 - with: - source-tag: ${{ github.ref_name }} + file_pattern: CHANGELOG.md \ No newline at end of file diff --git a/.github/workflows/tag-update-major-tag.yml b/.github/workflows/tag-update-major-tag.yml new file mode 100644 index 0000000..e51d20c --- /dev/null +++ b/.github/workflows/tag-update-major-tag.yml @@ -0,0 +1,27 @@ +name: Update major tag +on: + push: + tags: + - "v*" + +jobs: + create-changelog: + runs-on: ubuntu-latest + permissions: + contents: write + + steps: + - uses: actions/create-github-app-token@v1 + id: app-token + with: + app-id: ${{ secrets.DEPLOY_APP_ID }} + private-key: ${{ secrets.DEPLOY_APP_KEY }} + + - uses: actions/checkout@v4 + with: + token: ${{ steps.app-token.outputs.token }} + + - name: Update major tag to ${{ github.ref_name }} + uses: actions/publish-action@v0.3.0 + with: + source-tag: ${{ github.ref_name }}