Repository navigation
44 lines (41 loc) · 1.62 KB
/
Copy pathrelease.yml
File metadata and controls
44 lines (41 loc) · 1.62 KB
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
name: Create a release
on:
push:
tags:
- 'v*'
permissions:
contents: write
id-token: write
jobs:
build:
name: Create a release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version-file: .node-version
cache: npm
- name: make
uses: ./.github/actions/build-sqljs
- name: Package release assets
working-directory: dist
run: |
zip sqljs-wasm.zip sql-wasm.{js,wasm}
zip sqljs-worker-wasm.zip worker.sql-wasm.js sql-wasm.wasm
zip sqljs-all.zip *.{js,wasm}
- name: Create release and upload assets
env:
GH_TOKEN: ${{ github.token }}
RELEASE_TAG: ${{ github.ref_name }}
run: |
gh release create "$RELEASE_TAG" --verify-tag --title "Release $RELEASE_TAG" --notes "" \
'dist/sqljs-wasm.zip#wasm version, best runtime performance, smaller assets, requires configuration' \
'dist/sql-wasm-inline.js#single JavaScript file with embedded WebAssembly, no configuration required' \
'dist/sqljs-worker-wasm.zip#webworker wasm version, to be loaded as a web worker' \
'dist/worker.sql-wasm-inline.js#single-file WebAssembly version, to be loaded as a web worker' \
'dist/sqljs-all.zip#all versions, including non-minified javascript'
- name: publish the package to NPM
run: |
npm install -g npm@12.2.0
npm publish --provenance --access public