From bd14f46deb3792e0887ba6b5c70d84c997eff00c Mon Sep 17 00:00:00 2001 From: hamster1963 <1410514192@qq.com> Date: Thu, 10 Oct 2024 09:50:16 +0800 Subject: [PATCH] fix: generate changelog after build process --- .github/workflows/Deploy.yml | 55 ++++++++++++++++++------------------ 1 file changed, 28 insertions(+), 27 deletions(-) diff --git a/.github/workflows/Deploy.yml b/.github/workflows/Deploy.yml index 5e2c76f..76be8c1 100644 --- a/.github/workflows/Deploy.yml +++ b/.github/workflows/Deploy.yml @@ -10,33 +10,6 @@ env: ALIYUN_REGISTRY_IMAGE: registry.cn-guangzhou.aliyuncs.com/hamster-home/nezha-dash jobs: - changelog: - name: Generate Changelog - runs-on: ubuntu-latest - outputs: - release_body: ${{ steps.git-cliff.outputs.content }} - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Generate a changelog - uses: orhun/git-cliff-action@v4 - id: git-cliff - with: - config: git-cliff-config/cliff.toml - args: -vv --latest --strip 'footer' - env: - OUTPUT: CHANGES.md - - name: Release - uses: softprops/action-gh-release@v2 - if: startsWith(github.ref, 'refs/tags/') - with: - body: ${{ steps.git-cliff.outputs.content }} - token: ${{ secrets.GITHUB_TOKEN }} - env: - GITHUB_REPOSITORY: ${{ github.repository }} - build-and-push: name: Build and push Docker image runs-on: ubuntu-latest @@ -83,3 +56,31 @@ jobs: push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} + + changelog: + name: Generate Changelog + runs-on: ubuntu-latest + needs: build-and-push + outputs: + release_body: ${{ steps.git-cliff.outputs.content }} + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Generate a changelog + uses: orhun/git-cliff-action@v4 + id: git-cliff + with: + config: git-cliff-config/cliff.toml + args: -vv --latest --strip 'footer' + env: + OUTPUT: CHANGES.md + - name: Release + uses: softprops/action-gh-release@v2 + if: startsWith(github.ref, 'refs/tags/') + with: + body: ${{ steps.git-cliff.outputs.content }} + token: ${{ secrets.GITHUB_TOKEN }} + env: + GITHUB_REPOSITORY: ${{ github.repository }}