-
Notifications
You must be signed in to change notification settings - Fork 2
55 lines (45 loc) · 1.28 KB
/
publish.yml
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
51
52
53
54
55
name: publish
on:
push:
branches:
- main
- next
- beta
- alpha
permissions:
contents: read
jobs:
publish:
name: publish
runs-on: ubuntu-latest
permissions:
contents: write
issues: write
pull-requests: write
id-token: write
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set Up Node
uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Set Up Bun
uses: oven-sh/setup-bun@v2
- name: Install Project Dependencies
run: bun install
- name: Build the package
run: bun run build
- name: Create Distribution Archive
run: |
zip -r build.zip dist package.json CHANGELOG.md README.md LICENSE
tar -czvf build.tar.gz dist package.json CHANGELOG.md README.md LICENSE
- name: Publish Package
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
GITHUB_NPM_CONFIG_REGISTRY: https://npm.pkg.github.com/
GITHUB_NPM_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
PUBLIC_NPM_CONFIG_REGISTRY: https://registry.npmjs.org
PUBLIC_NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: bun run release