Skip to content

Commit ec3f34a

Browse files
committed
ci(release): add changelog to release ci
1 parent c554eb9 commit ec3f34a

File tree

3 files changed

+59
-38
lines changed

3 files changed

+59
-38
lines changed

.github/workflows/release.yml

Lines changed: 42 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,52 @@ on:
55
tags:
66
- "v*.*.*"
77
- "v*.*.*-pre"
8+
workflow_call:
89

910
jobs:
10-
build:
11+
release:
1112
runs-on: ubuntu-latest
1213
name: Building stack
13-
1414
steps:
15-
- build:
15+
- name: Checkout
16+
uses: actions/checkout@v5
17+
18+
- name: "Setup pnpm"
19+
uses: pnpm/action-setup@v4
20+
21+
- name: "Setup node"
22+
uses: actions/setup-node@v4
23+
with:
24+
node-version: 23.6.0
25+
cache: "pnpm"
26+
27+
- name: "Install dependencies"
28+
run: pnpm install
29+
30+
- name: "Install emscipten"
31+
uses: "mymindstorm/setup-emsdk@v14"
32+
with:
33+
actions-cache-folder: ${{env.EM_CACHE_FOLDER}}
34+
35+
- name: "Build"
36+
run: pnpm build
37+
38+
- name: Get previous tag
39+
id: previousTag
40+
run: |
41+
name=$(git --no-pager tag --sort=creatordate --merged ${{ github.ref_name }} | tail -2 | head -1)
42+
echo "previousTag: $name"
43+
echo "previousTag=$name" >> $GITHUB_ENV
44+
45+
- name: Update CHANGELOG
46+
id: changelog
47+
uses: requarks/changelog-action@v1
48+
with:
49+
token: ${{ secrets.GITHUB_TOKEN }}
50+
tag: ${{ github.ref_name }}
51+
# fromTag: ${{ github.ref_name }}
52+
# toTag: ${{ env.previousTag }}
53+
writeToFile: false
1654

1755
- name: Release
18-
uses: softprops/action-gh-release@v2
19-
if: startsWith(github.ref, 'refs/tags/')
56+
shell: echo ${{ steps.changelog.outputs.changes }}

.github/workflows/setup.yml

Lines changed: 0 additions & 26 deletions
This file was deleted.

.github/workflows/tests.yml

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,24 @@ jobs:
1616
steps:
1717
- name: Checkout
1818
uses: actions/checkout@v5
19-
setup:
20-
needs: checkout
21-
uses: './.github/workflows/setup.yml'
2219

23-
tests:
24-
runs-on: ubuntu-latest
25-
needs: [checkout, setup]
26-
steps:
20+
- name: "Setup pnpm"
21+
uses: pnpm/action-setup@v4
22+
23+
- name: "Setup node"
24+
uses: actions/setup-node@v4
25+
with:
26+
node-version: 23.6.0
27+
cache: "pnpm"
28+
29+
- name: "Install dependencies"
30+
run: pnpm install
31+
32+
- name: "Install emscipten"
33+
uses: "mymindstorm/setup-emsdk@v14"
34+
with:
35+
actions-cache-folder: ${{env.EM_CACHE_FOLDER}}
36+
2737
- name: "Run build"
2838
run: pnpm build
2939

0 commit comments

Comments
 (0)