-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (48 loc) · 1.44 KB
/
Copy pathonRelease.yml
File metadata and controls
50 lines (48 loc) · 1.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: publish
on:
release:
types: [released]
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: '24'
registry-url: 'https://registry.npmjs.org'
- uses: pnpm/action-setup@v4
name: Install pnpm
id: pnpm-install
with:
package_json_file: package.json
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v5
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- run: pnpm install
- run: pnpm run build
- run: pnpm run prepack
- run: npm publish --no-git-checks --access public
- run: pnpm run postpack
- run: pnpm run pack:tarballs
- name: Upload tarballs to release
uses: ncipollo/release-action@b7eabc95ff50cbeeedec83973935c8f306dfcd0b
with:
artifacts: "dist/*.tar*"
allowUpdates: true
omitBodyDuringUpdate: true
omitNameDuringUpdate: true
token: ${{ secrets.GH_TOKEN }}