-
-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (49 loc) · 1.3 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
name: Release
on:
push:
tags: v*
jobs:
releases:
name: Upload to Releases
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- run: npm clean-install
- run: npm run bundle
- name: Generate checksums.txt
run: shasum -a 256 * > checksums.txt
working-directory: dist
- name: Upload to Releases
uses: softprops/action-gh-release@v2
with:
files: |
dist/*.cjs
dist/*.cjs.map
dist/*.mjs
dist/*.mjs.map
dist/checksums.txt
fail_on_unmatched_files: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
npmjs:
name: Publish on npmjs
# It doesn't depend on releases, but we want to run this after the releases
# job succeeded.
needs:
- releases
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: sudo apt-get install asciidoctor pandoc
- run: npm clean-install
- run: npm run build
- name: Set up .npmrc file
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
registry-url: 'https://registry.npmjs.org'
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}