Skip to content

Commit 89ede07

Browse files
authored
chore: sync cicd with toon4s
Chore/sync cicd with toon4s
2 parents 5a4626e + 5795a3b commit 89ede07

File tree

16 files changed

+558
-1274
lines changed

16 files changed

+558
-1274
lines changed

.github/workflows/auto-tag.yml

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# Auto tag - Automated semantic versioning based on conventional commits
2-
# Mirrors toon4s setup for FlowForge
32
name: Auto tag
43

54
on:
@@ -28,7 +27,6 @@ jobs:
2827
token: ${{ secrets.GITHUB_TOKEN }}
2928

3029
- name: Check and clean incomplete releases
31-
id: check_release
3230
uses: actions/github-script@v7
3331
with:
3432
script: |
@@ -45,16 +43,13 @@ jobs:
4543
repo: context.repo.repo,
4644
tag: tag.name
4745
});
48-
console.log(`Release exists for tag ${tag.name}`);
4946
} catch (error) {
5047
if (error.status === 404) {
51-
console.log(`No release found for tag ${tag.name}, deleting tag`);
5248
await github.rest.git.deleteRef({
5349
owner: context.repo.owner,
5450
repo: context.repo.repo,
5551
ref: `tags/${tag.name}`
5652
});
57-
console.log(`Deleted tag ${tag.name}`);
5853
}
5954
}
6055
}
@@ -92,26 +87,3 @@ jobs:
9287
tag: '${{ steps.tag_version.outputs.new_tag }}'
9388
}
9489
});
95-
96-
- name: Summary
97-
if: steps.tag_version.outputs.new_tag != ''
98-
run: |
99-
echo "## Tag Created Successfully" >> $GITHUB_STEP_SUMMARY
100-
echo "" >> $GITHUB_STEP_SUMMARY
101-
echo "**New Tag**: \`${{ steps.tag_version.outputs.new_tag }}\`" >> $GITHUB_STEP_SUMMARY
102-
echo "**Previous Tag**: \`${{ steps.tag_version.outputs.previous_tag }}\`" >> $GITHUB_STEP_SUMMARY
103-
echo "**Version Bump**: \`${{ steps.tag_version.outputs.part }}\`" >> $GITHUB_STEP_SUMMARY
104-
echo "" >> $GITHUB_STEP_SUMMARY
105-
echo "**Changelog**:" >> $GITHUB_STEP_SUMMARY
106-
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
107-
echo "${{ steps.tag_version.outputs.changelog }}" >> $GITHUB_STEP_SUMMARY
108-
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
109-
echo "" >> $GITHUB_STEP_SUMMARY
110-
echo "🚀 Release workflow triggered via repository_dispatch" >> $GITHUB_STEP_SUMMARY
111-
112-
- name: No tag created
113-
if: steps.tag_version.outputs.new_tag == ''
114-
run: |
115-
echo "## No Tag Created" >> $GITHUB_STEP_SUMMARY
116-
echo "" >> $GITHUB_STEP_SUMMARY
117-
echo "No version bump needed based on commit messages" >> $GITHUB_STEP_SUMMARY

.github/workflows/changelog.yml

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,30 @@
11
name: Changelog
22

33
on:
4-
push:
5-
branches: [main]
6-
paths:
7-
- 'modules/**'
8-
- 'build.sbt'
9-
- 'project/**'
4+
repository_dispatch:
5+
types: [release-completed]
106
workflow_dispatch:
117

8+
concurrency:
9+
group: changelog-${{ github.ref }}
10+
cancel-in-progress: false
11+
1212
permissions:
1313
contents: write
1414
pull-requests: write
1515

1616
jobs:
1717
changelog:
18+
name: Generate changelog
1819
runs-on: ubuntu-latest
1920
timeout-minutes: 5
21+
2022
steps:
2123
- name: Checkout
22-
uses: actions/checkout@v6.0.2
24+
uses: actions/checkout@v4
2325
with:
2426
fetch-depth: 0
27+
ref: main
2528

2629
- name: Install git-cliff
2730
run: |
@@ -30,11 +33,13 @@ jobs:
3033
sudo mv git-cliff-*/git-cliff /usr/local/bin/
3134
git-cliff --version
3235
33-
- name: Generate changelog
36+
- name: Generate full changelog
37+
env:
38+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3439
run: |
35-
git-cliff --config cliff.toml --verbose --unreleased --tag unreleased -o CHANGELOG.md
40+
git-cliff --config cliff.toml --verbose -o CHANGELOG.md
3641
37-
- name: Commit changelog
42+
- name: Commit and push changelog
3843
run: |
3944
git config user.name "github-actions[bot]"
4045
git config user.email "github-actions[bot]@users.noreply.github.com"
@@ -46,4 +51,4 @@ jobs:
4651
4752
git add CHANGELOG.md
4853
git commit -m "docs: update CHANGELOG.md [skip ci]"
49-
git push
54+
git push origin main

0 commit comments

Comments
 (0)