Skip to content

Commit 60771b0

Browse files
committed
[autosync]
1 parent 0c6e496 commit 60771b0

1 file changed

Lines changed: 19 additions & 9 deletions

File tree

.github/workflows/SemanticRelease.yml

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,8 @@ jobs:
1717
# ensures this only runs if the PR was actually merged, not just closed unmerged
1818
if: github.event.pull_request.merged == true
1919
runs-on: ubuntu-latest
20-
env:
21-
# toggle to 'false' to only push the tag and skip creating the GitHub Release
22-
CREATE_RELEASE: 'true'
2320
outputs:
21+
type: ${{ steps.parse.outputs.type }}
2422
version: ${{ steps.increment.outputs.version }}
2523
steps:
2624
- name: ⚡ Checkout repository ⚡
@@ -74,21 +72,33 @@ jobs:
7472
7573
NEXT_VERSION="${MAJOR}.${MINOR}.${PATCH}"
7674
echo "version=$NEXT_VERSION" >> "$GITHUB_OUTPUT"
75+
publish:
76+
name: Publish Release
77+
needs:
78+
- release
79+
80+
if: needs.release.outputs.type != 'none'
81+
runs-on: ubuntu-latest
82+
env:
83+
# toggle to 'false' to only push the tag and skip creating the GitHub Release
84+
CREATE_RELEASE: 'true'
85+
steps:
86+
- name: ⚡ Checkout repository ⚡
87+
uses: actions/checkout@v6
7788

7889
- name: ⚡ Create tag ⚡
79-
if: steps.parse.outputs.type != 'none'
8090
run: |
8191
git config user.name "rarest automation"
8292
git config user.email "automation@noreply.rarestype.com"
8393
84-
git tag "${{ steps.increment.outputs.version }}"
85-
git push origin "${{ steps.increment.outputs.version }}"
94+
git tag "${{ needs.release.outputs.version }}"
95+
git push origin "${{ needs.release.outputs.version }}"
8696
8797
- name: ⚡ Create release ⚡
88-
if: steps.parse.outputs.type != 'none' && env.CREATE_RELEASE == 'true'
98+
if: env.CREATE_RELEASE == 'true'
8999
run: |
90-
gh release create "${{ steps.increment.outputs.version }}" \
91-
--title "${{ steps.increment.outputs.version }}" \
100+
gh release create "${{ needs.release.outputs.version }}" \
101+
--title "${{ needs.release.outputs.version }}" \
92102
--generate-notes
93103
env:
94104
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)