Skip to content

Commit 83972c0

Browse files
Refactor GitHub Actions workflow for release process (#1522)
- Simplified the release workflow by removing unnecessary comments and steps related to Node.js setup and dependency caching. - Ensured the workflow continues to utilize 'bun run semantic-release' for streamlined CI execution. These changes enhance the clarity and efficiency of the release process in GitHub Actions. Co-authored-by: Mariano Fuentes <marfuen98@gmail.com>
1 parent 53bc12e commit 83972c0

1 file changed

Lines changed: 6 additions & 30 deletions

File tree

.github/workflows/release.yml

Lines changed: 6 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
name: Release
22

33
on:
4-
push: # Runs AFTER merge to release branch
4+
push:
55
branches:
66
- release
77

88
permissions:
9-
contents: write # Allow check out and commit changes (version, changelog)
10-
issues: write # Allow commenting on issues/PRs
11-
pull-requests: write # Allow commenting on issues/PRs
12-
id-token: write # Needed for provenance
9+
contents: write
10+
issues: write
11+
pull-requests: write
1312

1413
jobs:
1514
release:
@@ -19,41 +18,18 @@ jobs:
1918
- name: Checkout
2019
uses: actions/checkout@v4
2120
with:
22-
# Fetch all history so semantic-release can analyze commits
2321
fetch-depth: 0
24-
# Use a token that has permission to push to the repository
25-
# Either a PAT stored in GH_TOKEN or the default GITHUB_TOKEN
2622
token: ${{ secrets.GH_TOKEN || secrets.GITHUB_TOKEN }}
2723

28-
- name: Setup Node.js
29-
uses: actions/setup-node@v4
30-
with:
31-
node-version: '20' # Or your preferred Node.js version
32-
3324
- name: Setup Bun
3425
uses: oven-sh/setup-bun@v2
35-
with:
36-
bun-version: latest # Optional: specify a bun version
37-
38-
- name: Cache dependencies
39-
uses: WarpBuilds/cache@v1
40-
with:
41-
path: |
42-
~/.bun/install/cache
43-
node_modules
44-
apps/*/node_modules
45-
packages/*/node_modules
46-
key: ${{ runner.os }}-bun-release-${{ hashFiles('**/bun.lock') }}
47-
restore-keys: |
48-
${{ runner.os }}-bun-release-
49-
${{ runner.os }}-bun-
5026

5127
- name: Install dependencies
52-
run: bun install --frozen-lockfile # Use --frozen-lockfile in CI
28+
run: bun install --frozen-lockfile
5329

5430
- name: Release
5531
env:
5632
GITHUB_TOKEN: ${{ secrets.GH_TOKEN || secrets.GITHUB_TOKEN }}
5733
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
58-
HUSKY: 0 # Skip husky hooks in CI
34+
HUSKY: 0
5935
run: bun run semantic-release

0 commit comments

Comments
 (0)