Skip to content

Commit 937bf36

Browse files
committed
ci(*): update GitHub Actions
1 parent f188acc commit 937bf36

File tree

3 files changed

+20
-2043
lines changed

3 files changed

+20
-2043
lines changed

.github/workflows/release.yaml

Lines changed: 14 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -28,33 +28,18 @@ jobs:
2828
with:
2929
persist-credentials: false
3030

31-
# Setup Node
32-
- name: 📦 Setup Node.js
33-
uses: actions/setup-node@v4
34-
with:
35-
node-version: "lts/*"
36-
3731
# Install pnpm
3832
- name: 📦 Install pnpm
39-
uses: pnpm/action-setup@v3
33+
uses: pnpm/action-setup@v4
4034
with:
41-
version: 9
42-
run_install: false
35+
version: 10
4336

44-
# Get pnpm store directory
45-
- name: 📦 Get pnpm store directory
46-
shell: bash
47-
run: |
48-
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
49-
50-
# Setup pnpm cache
51-
- name: 📦 Setup pnpm cache
52-
uses: actions/cache@v4
37+
# Setup Node
38+
- name: 📦 Setup Node.js
39+
uses: actions/setup-node@v4
5340
with:
54-
path: ${{ env.STORE_PATH }}
55-
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
56-
restore-keys: |
57-
${{ runner.os }}-pnpm-store-
41+
node-version: "lts/*"
42+
cache: "pnpm"
5843

5944
# Install dependencies
6045
- name: 📦 Install dependencies
@@ -63,6 +48,12 @@ jobs:
6348
6449
# Create semantic release
6550
- name: 🚀 Create semantic release
51+
uses: cycjimmy/semantic-release-action@v4
52+
with:
53+
semantic_version: 24
54+
extra_plugins: |
55+
- "@semantic-release/changelog"
56+
- "@semantic-release/git"
57+
- "@semantic-release/exec"
6658
env:
6759
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
68-
run: pnpm run semantic-release

package.json

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"update-blog-list": "node ./scripts/update-blog-list.js",
1010
"preview": "astro preview",
1111
"astro": "astro",
12-
"prettier": "prettier --write ./src --plugin=prettier-plugin-astro",
12+
"prettier": "prettier --write ./src --cache",
1313
"semantic-release": "semantic-release",
1414
"upgrade": "pnpm dlx @astrojs/upgrade && pnpm up -i"
1515
},
@@ -33,7 +33,6 @@
3333
"astro-seo": "^0.8.4",
3434
"hast": "^1.0.0",
3535
"mdast-util-to-string": "^4.0.0",
36-
"prettier-plugin-organize-imports": "^4.1.0",
3736
"reading-time": "^1.5.0",
3837
"satori": "^0.12.1",
3938
"sharp": "^0.33.5",
@@ -43,13 +42,10 @@
4342
"unist-util-visit": "^5.0.0"
4443
},
4544
"devDependencies": {
46-
"@semantic-release/changelog": "^6.0.3",
47-
"@semantic-release/exec": "^7.0.3",
48-
"@semantic-release/git": "^10.0.1",
4945
"@types/hast": "^3.0.4",
5046
"astro-meta-tags": "^0.3.1",
5147
"prettier": "^3.4.2",
5248
"prettier-plugin-astro": "^0.14.1",
53-
"semantic-release": "^24.2.1"
49+
"prettier-plugin-organize-imports": "^4.1.0"
5450
}
5551
}

0 commit comments

Comments
 (0)