-
Notifications
You must be signed in to change notification settings - Fork 49
70 lines (57 loc) · 1.91 KB
/
Copy pathdapp-ipfs.yml
File metadata and controls
70 lines (57 loc) · 1.91 KB
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
name: dApp upload to IPFS
permissions:
contents: read
on:
push:
branches: [dapp_production]
workflow_dispatch:
# Retention policy: Keep successful runs for 30 days, failed/cancelled for 7 days
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: ./
steps:
- uses: actions/checkout@v6
- name: Install App dependencies
run: npm install
- name: Build app
env:
PUBLIC_STELLAR_NETWORK_PASSPHRASE: ${{ vars.PUBLIC_STELLAR_NETWORK_PASSPHRASE }}
PUBLIC_STELLAR_RPC_URL: ${{ vars.PUBLIC_STELLAR_RPC_URL }}
PUBLIC_PUBLIC_STELLAR_HORIZON_URL: ${{ vars.PUBLIC_PUBLIC_STELLAR_HORIZON_URL }}
run: npm run build
- name: Generate artifact attestation for dist
uses: actions/attest-build-provenance@977bb373ede98d70efdf65b84cb5f73e068dcc2a
with:
subject-path: "./dist/*"
- name: Archive production artifacts
uses: actions/upload-artifact@v5
with:
name: dist
path: |
./dist/*
- uses: storacha/add-to-web3@892505d8e70c79336721485e5500155c17a728e0
id: storacha
with:
path_to_add: "./dist"
secret_key: ${{ secrets.STORACHA_PRINCIPAL }}
proof: ${{ secrets.STORACHA_PROOF }}
- name: Job summary
run: |
echo "### Shipping to IPFS! :rocket:" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "- CID: ${{ steps.storacha.outputs.cid }}" >> "$GITHUB_STEP_SUMMARY"
echo "- URL: ${{ steps.storacha.outputs.url }}" >> "$GITHUB_STEP_SUMMARY"
# Workflow run retention settings
retention-days: 30