-
Notifications
You must be signed in to change notification settings - Fork 25
113 lines (110 loc) Β· 3.96 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
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
name: Release
on:
push:
branches:
- main
jobs:
release:
name: Release Please
runs-on: ubuntu-latest
outputs:
releases_created: ${{steps.release.outputs.releases_created}}
paths_released: ${{steps.release.outputs.paths_released}}
steps:
- uses: GoogleCloudPlatform/release-please-action@v3
id: release
with:
token: ${{secrets.GITHUB_TOKEN}}
command: manifest
publish:
name: Publish npm packages
needs: release
if: ${{needs.release.outputs.releases_created}}
runs-on: ubuntu-latest
strategy:
matrix:
path_released: ${{fromJson(needs.release.outputs.paths_released)}}
exclude:
- path_released: examples/react/w3console
steps:
- uses: actions/checkout@v3
if: ${{matrix.path_released != ''}}
- uses: ./.github/actions/pnpm
if: ${{matrix.path_released != ''}}
- run: pnpm lint
if: ${{matrix.path_released != ''}}
- run: pnpm test
if: ${{matrix.path_released != ''}}
- name: pnpm publish
if: ${{matrix.path_released != ''}}
run: |
cd ${{ matrix.path_released }}
pnpm install
pnpm publish --access=public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
publish-w3console-staging:
name: Publish w3console staging
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/pnpm
- name: Build staging.console.web3.storage
run: pnpm build
working-directory: examples/react/w3console
env:
VITE_W3UP_PROVIDER: did:web:staging.web3.storage
VITE_W3UP_ACCESS_SERVICE_URL: 'https://staging.up.web3.storage'
VITE_W3UP_ACCESS_SERVICE_DID: 'did:web:staging.web3.storage'
VITE_W3UP_UPLOAD_SERVICE_URL: 'https://staging.up.web3.storage'
VITE_W3UP_UPLOAD_SERVICE_DID: 'did:web:staging.web3.storage'
VITE_W3UP_SERVICE_BRAND_NAME: 'staging.web3.storage'
- name: Publish staging.console.web3.storage
uses: ./.github/actions/preview
with:
path_to_add: examples/react/w3console/dist
web3_token: ${{ secrets.WEB3_TOKEN }}
cf_pages_project: console-web3-storage-staging
cf_account_id: ${{ secrets.CF_ACCOUNT_ID }}
cf_token: ${{ secrets.CF_TOKEN }}
publish-w3console-production:
name: Publish w3console production
needs: release
if: contains(fromJson(needs.release.outputs.paths_released), 'examples/react/w3console')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/pnpm
- name: Build console.web3.storage
run: pnpm build
working-directory: examples/react/w3console
env:
VITE_W3UP_PROVIDER: did:web:web3.storage
VITE_W3UP_SERVICE_BRAND_NAME: 'web3.storage'
- name: Publish console.web3.storage
uses: ./.github/actions/preview
with:
path_to_add: examples/react/w3console/dist
web3_token: ${{ secrets.WEB3_TOKEN }}
dnslink_record: beta.console
dnslink_domain: web3.storage
cf_pages_project: console-web3-storage
cf_account_id: ${{ secrets.CF_ACCOUNT_ID }}
cf_token: ${{ secrets.CF_TOKEN }}
- name: Build console.nft.storage
run: pnpm build
working-directory: examples/react/w3console
env:
VITE_W3UP_PROVIDER: did:web:nft.storage
VITE_W3UP_SERVICE_BRAND_NAME: 'NFT.Storage'
VITE_W3UP_GATEWAY_HOST: nftstorage.link
- name: Publish console.nft.storage
uses: ./.github/actions/preview
with:
path_to_add: examples/react/w3console/dist
web3_token: ${{ secrets.WEB3_TOKEN }}
dnslink_record: beta.console
dnslink_domain: nft.storage
cf_pages_project: console-nft-storage
cf_account_id: ${{ secrets.CF_ACCOUNT_ID }}
cf_token: ${{ secrets.CF_TOKEN }}