-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (42 loc) · 1.49 KB
/
publish.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
name: Publish
on:
create:
tags:
- "v*"
jobs:
publish:
if: startsWith(github.ref, 'refs/tags/v')
permissions:
packages: write
contents: write
id-token: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version-file: ".node-version"
registry-url: "https://registry.npmjs.org"
- run: |
wget -P ${{ runner.temp }} https://github.com/tinygo-org/tinygo/releases/download/v0.28.1/tinygo_0.28.1_amd64.deb
yes | sudo dpkg -i ${{ runner.temp }}/tinygo_0.28.1_amd64.deb
- run: npm run build
- name: Publish to npmjs
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- uses: actions/setup-node@v3
with:
node-version-file: ".node-version"
registry-url: "https://npm.pkg.github.com"
- name: Publish to github packages
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Pack
run: npm pack
- name: Publish to Github Releases
uses: softprops/action-gh-release@c9b46fe7aad9f02afd89b12450b780f52dacfb2d
with:
files: |
*.tgz