-
Notifications
You must be signed in to change notification settings - Fork 12
67 lines (51 loc) · 1.47 KB
/
release.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
56
57
58
59
60
61
62
63
64
65
66
67
name: Publish package to NPM
on:
push:
tags:
- 'v*'
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
- uses: actions/checkout@v3
- uses: extractions/setup-just@v1
- name: Setup Node.js environment
uses: actions/[email protected]
- name: Setup Deno
uses: denoland/[email protected]
- name: Build
run: npm run build
- name: remove dist/ package for now
run: rm dist/*.tgz
- name: Update package version
run: |
tag="${{ github.ref }}"
tag="${tag/refs\/tags\/v/}"
npm version $tag --no-git-tag-version --no-commit-hooks
jsr="$(<jsr.json jq '. |.version = $version' --arg version "$tag")"
echo "$jsr" >jsr.json
- name: npm publish @extism/extism
uses: JS-DevTools/[email protected]
with:
token: ${{ secrets.NPM_TOKEN }}
- name: jsr publish @extism/extism
run: |
npx jsr publish --allow-dirty
- name: Update package name
run: |
pkg="$(<package.json jq '.name = "extism"')"
echo "$pkg" >package.json
- name: npm publish extism
uses: JS-DevTools/[email protected]
with:
token: ${{ secrets.NPM_TOKEN }}
- name: typedoc
run: just docs
- name: Deploy docs to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs