Skip to content

Commit 7cce4dc

Browse files
committed
chore(ci): update release action
Signed-off-by: tunnckoCore <5038030+tunnckoCore@users.noreply.github.com>
1 parent 15d9706 commit 7cce4dc

File tree

1 file changed

+19
-7
lines changed

1 file changed

+19
-7
lines changed

.github/workflows/release.yml

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,27 @@ jobs:
2323
- uses: oven-sh/setup-bun@735343b667d3e6f658f44d0eca948eb6282f2b76 # v2
2424
with:
2525
bun-version: 'latest'
26-
- uses: actions/cache@v4
27-
with:
28-
path: |
29-
~/.bun/install/cache
30-
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }}
26+
27+
- name: Compute cache keys
28+
shell: bash
29+
run: |
30+
if [ "$RUNNER_OS" = "macOS" ]; then
31+
HASH_CMD="shasum -a 256"
32+
else
33+
HASH_CMD="sha256sum"
34+
fi
35+
HASH_BUNLOCK=$($HASH_CMD bun.lock | awk '{print $1}')
36+
echo "HASH_BUNLOCK=$HASH_BUNLOCK" >> $GITHUB_ENV
37+
38+
3139
- name: Install dependencies
32-
run: bun install
40+
shell: bash
41+
id: install
42+
run: bun install --frozen-lockfile
43+
continue-on-error: false
44+
3345
# no need for `bun run build` because npm publishing trigger prepublishOnly,
34-
# which in turn would trigger tests, coverage badge generation, and build
46+
# which in turn would trigger `bun run release` thus lint, tests, coverage badge, and build
3547
- name: Semantic Release from Bun
3648
env:
3749
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)