@@ -21,18 +21,19 @@ jobs:
2121 with :
2222 persist-credentials : false # This is important if you have branch protection rules!
2323 - name : Semantic Release
24+ id : semantic
2425 uses : cycjimmy/semantic-release-action@v4
2526 with :
2627 branch : ' master'
28+ extra_plugins : |
29+ @semantic-release/changelog
2730 env :
2831 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
29- - name : Get Semantic Release Version
30- id : get-version
31- run : echo "::set-output name=version::$(grep -oP '\[\d+\.\d+\.\d+\]' CHANGELOG.md | tr -d '[]')"
3232
3333 - name : show version
3434 run : |
35- echo "Semantic Release Version: ${{ steps.get-version.outputs.version }}"
35+ echo "New release published: ${{ steps.semantic.outputs.new_release_published }}"
36+ echo "Semantic Release Version: ${{ steps.semantic.outputs.new_release_version }}"
3637
3738 - name : setup qemu for multi-arch build
3839 uses : docker/setup-qemu-action@v2
@@ -47,11 +48,12 @@ jobs:
4748 username : wurstbrot
4849 password : ${{ secrets.HUB_TOKEN }}
4950 - name : create and push dsomm image
51+ if : steps.semantic.outputs.new_release_published == 'true'
5052 uses : docker/build-push-action@v3
5153 with :
5254 push : true
5355 platforms : linux/amd64,linux/arm64
54- tags : wurstbrot/dsomm:${{ steps.get-version .outputs.version }},wurstbrot/dsomm:latest
56+ tags : wurstbrot/dsomm:${{ steps.semantic .outputs.new_release_version }},wurstbrot/dsomm:latest
5557 # Commit all changed files back to the repository
5658 - uses : planetscale/ghcommit-action@v0.1.6
5759 with :
0 commit comments