-
Notifications
You must be signed in to change notification settings - Fork 7
86 lines (73 loc) · 2.96 KB
/
prod-release.yaml
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
name: Release Extension
on:
release:
types: created
jobs:
build:
runs-on: ubuntu-latest
name: Build Extension
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 21
cache: "yarn"
cache-dependency-path: "**/yarn.lock"
- name: Install deps and build
working-directory: ./extension
run: |
yarn install --immutable
yarn build
- name: Update manifest.json with release tag
working-directory: ./extension
env:
RELEASE_TAG: ${{ github.event.release.tag_name }}
run: node ./manifest-util.js ./public/manifest.json
- name: Create extension zip file
working-directory: ./extension
run: yarn zip
- name: Add zip to Github release
uses: softprops/action-gh-release@v1
with:
files: ./extension/zodiac-pilot.zip
- name: Upload & release to Chrome Webstore
uses: mnao305/[email protected]
with:
file-path: ./extension/zodiac-pilot.zip
extension-id: jklckajipokenkbbodifahogmidkekcb
client-id: ${{ secrets.CHROME_WEBSTORE_CLIENT_ID }}
client-secret: ${{ secrets.CHROME_WEBSTORE_CLIENT_SECRET }}
refresh-token: ${{ secrets.CHROME_WEBSTORE_REFRESH_TOKEN }}
publish: false
- run: mkdir ./extension/release
- run: mv ./extension/zodiac-pilot.zip ./extension/release/zodiac-pilot.zip
# - name: Pin to IPFS
# id: upload
# uses: anantaramdas/ipfs-pinata-deploy-action@39bbda1ce1fe24c69c6f57861b8038278d53688d
# with:
# pin-name: Zodiac Pilot Chrome Extension ${{ github.event.release.tag_name }}
# path: "./extension/release"
# pinata-api-key: ${{ secrets.PINATA_API_KEY }}
# pinata-secret-api-key: ${{ secrets.PINATA_API_SECRET_KEY }}
# - name: Convert CIDv0 to CIDv1
# id: convert_cidv0
# uses: uniswap/[email protected]
# with:
# cidv0: ${{ steps.upload.outputs.hash }}
# - name: Add IPFS links to Github release notes
# id: update_release
# uses: tubone24/[email protected]
# env:
# GITHUB_TOKEN: ${{ github.token }}
# with:
# is_append_body: true
# body: |
# <br />
# This extension will be available in the Chrome Extension store, or you can download it from IPFS, extract it and run it as an unpacked extension.
# IPFS hash of the extension zip file:
# - CIDv0: `${{ steps.upload.outputs.hash }}`
# - CIDv1: `${{ steps.convert_cidv0.outputs.cidv1 }}`
# IPFS gateways:
# - https://gnosis.mypinata.cloud/ipfs/${{ steps.upload.outputs.hash }}
# - https://${{ steps.convert_cidv0.outputs.cidv1 }}.ipfs.dweb.link/
# - https://${{ steps.convert_cidv0.outputs.cidv1 }}.ipfs.cf-ipfs.com/