Skip to content

Commit 0ef6f56

Browse files
committed
Add publish workflow
1 parent 7e92219 commit 0ef6f56

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

.github/workflows/publish.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Release
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
setup:
9+
runs-on: ubuntu-latest
10+
name: Build and publish MathJax
11+
permissions:
12+
contents: read
13+
id-token: write
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
18+
- uses: pnpm/action-setup@v4
19+
name: Install pnpm
20+
with:
21+
version: 10
22+
run_install: false
23+
registry-url: 'https://registry.npmjs.org'
24+
25+
- name: Temp fix to publish
26+
run: |
27+
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
28+
echo "always-auth=true" >> ~/.npmrc
29+
30+
- name: Publish to npmjs
31+
run: pnpm publish --access public --no-git-checks
32+
env:
33+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
34+

0 commit comments

Comments
 (0)