Skip to content

Commit d8eac55

Browse files
authored
Create npm-publish-github-packages.yml
Signed-off-by: Shengyu Fu <[email protected]>
1 parent c24bcbd commit d8eac55

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Publish @microsoft/tiktokenizer to GitHub Packages
2+
3+
on: workflow_dispatch
4+
5+
defaults:
6+
run:
7+
working-directory: tokenizer_ts
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: read
13+
packages: write
14+
steps:
15+
- uses: actions/checkout@v3
16+
- uses: actions/setup-node@v3
17+
with:
18+
node-version: 18
19+
registry-url: 'https://npm.pkg.github.com'
20+
scope: '@microsoft'
21+
always-auth: true
22+
- run: npm ci
23+
- run: npm run build
24+
- run: npm run test
25+
- run: npm publish --access public
26+
env:
27+
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28+
- uses: actions/upload-artifact@v3
29+
with:
30+
name: npm-package
31+
path: tokenizer_ts/*.tgz

0 commit comments

Comments
 (0)