Skip to content
This repository was archived by the owner on Nov 5, 2024. It is now read-only.

Commit f8bbfb2

Browse files
committed
added release workflow
1 parent 7fdca5e commit f8bbfb2

File tree

2 files changed

+57
-1
lines changed

2 files changed

+57
-1
lines changed

.github/workflows/release.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
defaults:
9+
run:
10+
shell: bash
11+
12+
jobs:
13+
build-web:
14+
name: build web
15+
uses: lib-ruby-parser/wasm-bindings/.github/workflows/shared-build-and-test.yml@master
16+
with:
17+
node: '15'
18+
target: no-modules
19+
env: web
20+
21+
build-node:
22+
name: build node
23+
uses: lib-ruby-parser/wasm-bindings/.github/workflows/shared-build-and-test.yml@master
24+
with:
25+
node: '15'
26+
target: nodejs
27+
env: nodejs
28+
29+
create-release:
30+
needs: ['build-web', 'build-node']
31+
name: create release
32+
runs-on: ubuntu-latest
33+
steps:
34+
- name: checkout
35+
uses: actions/checkout@v2
36+
37+
- uses: actions/download-artifact@v2
38+
with: { name: web-lib-ruby-parser.js }
39+
- uses: actions/download-artifact@v2
40+
with: { name: web-lib-ruby-parser.wasm }
41+
- uses: actions/download-artifact@v2
42+
with: { name: nodejs-lib-ruby-parser.js }
43+
- uses: actions/download-artifact@v2
44+
with: { name: nodejs-lib-ruby-parser.wasm }
45+
46+
- name: show artifacts
47+
run: ls -l
48+
49+
- name: release
50+
uses: ncipollo/release-action@v1
51+
with:
52+
allowUpdates: true
53+
artifactErrorsFailBuild: true
54+
artifacts: "web-lib-ruby-parser.*,nodejs-lib-ruby-parser.*"
55+
token: ${{ secrets.GITHUB_TOKEN }}
56+

.github/workflows/shared-build-and-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ defaults:
2424

2525
jobs:
2626
build-and-test:
27-
name: build and upload ${{ inputs.target }}
27+
name: build, test and upload ${{ inputs.target }}
2828
runs-on: ubuntu-latest
2929
env:
3030
TARGET: ${{ inputs.target }}

0 commit comments

Comments
 (0)