Skip to content

Commit 56d38f3

Browse files
committed
CI: added release creation
1 parent 25abfcd commit 56d38f3

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

β€Ž.github/workflows/release.yml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- name: Checkout repository πŸ›ŽοΈ
15-
uses: actions/checkout@v3
15+
uses: actions/checkout@v4
1616
with:
1717
fetch-depth: 0
18+
fetch-tags: true
1819

1920
- name: Build πŸ—οΈ
2021
uses: ./.github/actions/build
@@ -27,23 +28,32 @@ jobs:
2728
- name: Bump version πŸ“
2829
run: pnpm bump-version
2930

30-
- name: Publish πŸš€
31+
- name: Publish to registry πŸš€
3132
run: pnpm release
3233

33-
- name: Update release info πŸ“
34+
- name: Sync release info πŸ“
35+
id: sync_release
3436
run: |
3537
git config --global user.email "github-actions[bot]@users.noreply.github.com"
3638
git config --global user.name "github-actions[bot]"
3739
git config pull.ff true
3840
git add . && git commit -m "CI: @sliit-foss/automatic-versioning - sync release" || true
39-
git pull --rebase && git push origin
41+
git tag "v$(node -e "console.log(require('./package.json').version)")" || true
42+
git pull --rebase && git push origin --tags
43+
echo "version=$(git describe --tags --abbrev=0)" >> $GITHUB_OUTPUT
44+
45+
- name: Create release on GitHub πŸ“
46+
uses: ncipollo/release-action@v1
47+
with:
48+
generateReleaseNotes: true
49+
tag: ${{steps.sync_release.outputs.version}}
4050

4151
site-release:
4252
name: Site Release
4353
runs-on: ubuntu-latest
4454
steps:
4555
- name: Checkout repository πŸ›ŽοΈ
46-
uses: actions/checkout@v3
56+
uses: actions/checkout@v4
4757

4858
- name: Build πŸ—οΈ
4959
uses: ./.github/actions/build

0 commit comments

Comments
Β (0)