52 lines (48 loc) · 1.61 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
name: Release
permissions:
contents: read
on:
workflow_dispatch:
jobs:
create_version_release:
name: create version release
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- name: Login GH CLI
run: gh auth login --with-token < <(echo ${{ secrets.GITHUB_TOKEN }})
- name: Delete old latest release
run: |
export VERSION=v$(cat package.json | jq ".version" | tr -d '"')
gh release delete -R infinyon/fluvio-client-wasm $VERSION -y || true
- name: Create new latest release
run: |
export VERSION=v$(cat package.json | jq ".version" | tr -d '"')
gh release create -R infinyon/fluvio-client-wasm $VERSION --notes "Published artifacts for $VERSION"
publish_release:
name: create latest release
runs-on: ubuntu-latest
needs:
- create_version_release
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- name: Install Rust stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
target: wasm32-unknown-unknown
- uses: actions/setup-node@v3
with:
node-version: '16.x'
- run: yarn install
- run: yarn pack --filename fluvio-client-wasm.tar.gz
- name: Login GH CLI
run: gh auth login --with-token < <(echo ${{ secrets.GITHUB_TOKEN }})
- run: |
export VERSION=v$(cat package.json | jq ".version" | tr -d '"')
gh release upload -R infinyon/fluvio-client-wasm --clobber $VERSION fluvio-client-wasm.tar.gz