-
Notifications
You must be signed in to change notification settings - Fork 8
57 lines (55 loc) · 2.43 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
52
53
54
55
56
57
name: Publish
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+-rc.[0-9]+'
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Get the version
id: get_version
run: |
version=$(echo ${GITHUB_REF/refs\/tags\//} | cut -c 2-)
echo ::set-output name=VERSION::$version
shell: bash
- uses: actions/checkout@v2
with:
fetch-depth: 0
submodules: true
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: 16
registry-url: 'https://registry.npmjs.org'
- name: Build and create the Firefox extension wallet zip file
run: |
export MANIFEST_VERSION=v2
yarn clean
yarn install --frozen-lockfile
yarn run build
pushd packages/extension
cp -r dist alephium-extension-wallet-firefox
zip -r alephium-extension-wallet-firefox-${{ steps.get_version.outputs.VERSION }}.zip alephium-extension-wallet-firefox
sha256sum "alephium-extension-wallet-firefox-${{ steps.get_version.outputs.VERSION }}.zip" > "alephium-extension-wallet-firefox-${{ steps.get_version.outputs.VERSION }}.zip.checksum"
popd
- name: Build and create the Chrome extension wallet zip file
run: |
export MANIFEST_VERSION=v3
yarn clean
yarn install --frozen-lockfile
yarn run build
pushd packages/extension
cp -r dist alephium-extension-wallet-chrome
zip -r alephium-extension-wallet-chrome-${{ steps.get_version.outputs.VERSION }}.zip alephium-extension-wallet-chrome
sha256sum "alephium-extension-wallet-chrome-${{ steps.get_version.outputs.VERSION }}.zip" > "alephium-extension-wallet-chrome-${{ steps.get_version.outputs.VERSION }}.zip.checksum"
popd
- name: Publish the zipped extension wallet
uses: softprops/action-gh-release@v0.1.14
with:
files: |
packages/extension/alephium-extension-wallet-chrome-${{ steps.get_version.outputs.VERSION }}.zip
packages/extension/alephium-extension-wallet-chrome-${{ steps.get_version.outputs.VERSION }}.zip.checksum
packages/extension/alephium-extension-wallet-firefox-${{ steps.get_version.outputs.VERSION }}.zip
packages/extension/alephium-extension-wallet-firefox-${{ steps.get_version.outputs.VERSION }}.zip.checksum