-
Notifications
You must be signed in to change notification settings - Fork 4
66 lines (54 loc) · 1.64 KB
/
dapp-ipfs.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
name: dApp upload to IPFS
permissions:
contents: read
on:
push:
branches: [ main ]
paths:
- "dapp/**"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
ipds:
name: Publish dApp on IPFS
runs-on: ubuntu-latest
permissions:
id-token: write
attestations: write
environment:
name: dapp-ipfs
defaults:
run:
working-directory: ./dapp
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- name: Install App dependencies
run: bun install
- name: Build app
run: bun run build
- name: Generate artifact attestation for dist
uses: actions/attest-build-provenance@7668571508540a607bdfd90a87a560489fe372eb
with:
subject-path: "./dapp/dist/*"
- name: Archive production artifacts
uses: actions/upload-artifact@v4
with:
name: dist
path: |
./dapp/dist/*
# https://web3.storage/docs/how-to/ci/#github-action-add-to-web3
- uses: web3-storage/add-to-web3@afd8cba20f920c998f6d3b38db0abe64242fe042
id: w3up
with:
path_to_add: "./dapp/dist"
proof: ${{ secrets.W3_PROOF }}
secret_key: ${{ secrets.W3_PRINCIPAL }}
- name: Job summary
run: |
echo "### Shipping to IPFS! :rocket:" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "- CID: ${{ steps.w3up.outputs.cid }}" >> "$GITHUB_STEP_SUMMARY"
echo "- URL: ${{ steps.w3up.outputs.url }}" >> "$GITHUB_STEP_SUMMARY"