Skip to content

Commit 4ec3572

Browse files
authored
upgrade actions; add publish workflow (#2026)
1 parent 70ee172 commit 4ec3572

File tree

3 files changed

+31
-6
lines changed

3 files changed

+31
-6
lines changed

.github/workflows/deploy.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,17 @@ jobs:
1616
url: ${{ steps.deployment.outputs.page_url }}
1717
steps:
1818
- uses: actions/checkout@v4
19-
- uses: actions/setup-node@v3
19+
- uses: actions/setup-node@v4
2020
with:
2121
node-version: 20
2222
cache: yarn
2323
- run: yarn --frozen-lockfile
2424
- run: yarn prepublishOnly
2525
- run: yarn docs:build
26-
- uses: actions/configure-pages@v3
27-
- uses: actions/upload-pages-artifact@v1
26+
- uses: actions/configure-pages@v4
27+
- uses: actions/upload-pages-artifact@v3
2828
with:
2929
path: docs/.vitepress/dist
3030
- name: Deploy
3131
id: deployment
32-
uses: actions/deploy-pages@v1
32+
uses: actions/deploy-pages@v4

.github/workflows/publish.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Publish
2+
3+
on:
4+
workflow_dispatch: {}
5+
release:
6+
types: [published]
7+
8+
jobs:
9+
publish:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: read
13+
packages: write
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: actions/setup-node@v4
17+
with:
18+
node-version: 20
19+
registry-url: 'https://registry.npmjs.org'
20+
cache: 'yarn'
21+
- run: yarn --frozen-lockfile
22+
- run: yarn test
23+
- run: npm publish
24+
env:
25+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- uses: actions/checkout@v4
14-
- uses: actions/setup-node@v3
14+
- uses: actions/setup-node@v4
1515
with:
1616
node-version: 20
1717
cache: yarn
@@ -24,7 +24,7 @@ jobs:
2424
- run: yarn test:prettier
2525
- run: yarn prepublishOnly
2626
- run: yarn docs:build
27-
- uses: actions/upload-artifact@v3
27+
- uses: actions/upload-artifact@v4
2828
if: failure()
2929
with:
3030
name: test-output-changes

0 commit comments

Comments
 (0)