Skip to content

Commit dc0aa6f

Browse files
committed
adjust
1 parent 330ee02 commit dc0aa6f

2 files changed

Lines changed: 13 additions & 5 deletions

File tree

.github/workflows/main.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -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:

.releaserc.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@
1212
}
1313
],
1414
"@semantic-release/release-notes-generator",
15+
[
16+
"@semantic-release/changelog",
17+
{
18+
"changelogFile": "CHANGELOG.md"
19+
}
20+
],
1521
"@semantic-release/github"
1622
]
1723
}

0 commit comments

Comments
 (0)