diff --git a/.github/workflows/build-push-docker.yml b/.github/workflows/build-push-docker.yml index 9c9ab93..aa31d25 100644 --- a/.github/workflows/build-push-docker.yml +++ b/.github/workflows/build-push-docker.yml @@ -2,8 +2,8 @@ name: Build and push Docker images on hub on: push: - branches: - - main + tags: + - v[0-9]+.[0-9]+.[0-9]+ jobs: build: diff --git a/.github/workflows/merge-in-main.yml b/.github/workflows/merge-in-main.yml deleted file mode 100644 index 04395d4..0000000 --- a/.github/workflows/merge-in-main.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: Build and push Docker images on hub - -on: - push: - branches: - - main - -jobs: - changelog: - name: Create Release - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: Update CHANGELOG - id: changelog - uses: requarks/changelog-action@v1 - with: - token: ${{ github.token }} - tag: ${{ github.ref_name }} - - - name: Create Release - uses: ncipollo/release-action@v1.12.0 - with: - allowUpdates: true - draft: false - makeLatest: true - name: ${{ github.ref_name }} - body: ${{ steps.changelog.outputs.changes }} - token: ${{ github.token }} - - - name: Commit CHANGELOG.md - uses: stefanzweifel/git-auto-commit-action@v4 - with: - branch: develop - commit_message: "docs: update CHANGELOG.md for ${{ github.ref_name }}" - file_pattern: CHANGELOG.md diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index be5a422..86ce610 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -39,7 +39,7 @@ jobs: - name: Push tag version run: | - git push origin ${{ steps.package-version.outputs.version }} + git push origin ${{ steps.package-version.outputs.current-version }} - name: Merge develop in main uses: devmasx/merge-branch@master @@ -48,3 +48,27 @@ jobs: from_branch: develop target_branch: main github_token: ${{ secrets.GITHUB_TOKEN }} + + - name: Update CHANGELOG + id: changelog + uses: requarks/changelog-action@v1 + with: + token: ${{ github.token }} + tag: ${{ steps.package-version.outputs.current-version }} + + - name: Create Release + uses: ncipollo/release-action@v1.12.0 + with: + allowUpdates: true + draft: false + makeLatest: true + name: ${{ steps.package-version.outputs.current-version }} + body: ${{ steps.changelog.outputs.changes }} + token: ${{ github.token }} + + - name: Commit CHANGELOG.md + uses: stefanzweifel/git-auto-commit-action@v4 + with: + branch: develop + commit_message: "docs: update CHANGELOG.md for ${{ steps.package-version.outputs.current-version }}" + file_pattern: CHANGELOG.md