Skip to content

Commit d80462d

Browse files
committed
ci(publish): Add workflow to automate publish
1 parent feec580 commit d80462d

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

.github/workflows/publish.yml

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Publish YTMP3-JS
2+
on:
3+
release:
4+
types: [released]
5+
6+
jobs:
7+
publish:
8+
runs-on: ubuntu-latest
9+
10+
permissions:
11+
id-token: write
12+
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v4
16+
17+
- name: Setup Node.js
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: 20.x
21+
cache: npm
22+
registry-url: "https://registry.npmjs.org"
23+
24+
- name: Install dependencies
25+
run: npm ci
26+
27+
- name: Publish to NPM registry
28+
run: |
29+
npm pkg delete devDependencies
30+
npm publish --provenance --access public
31+
env:
32+
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}

0 commit comments

Comments
 (0)