Skip to content

Commit 8615fcb

Browse files
authored
Add deployment workflows (#139)
1 parent 39f3f4d commit 8615fcb

File tree

4 files changed

+542
-570
lines changed

4 files changed

+542
-570
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Publish contracts
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
permissions: # required permissions for the workflow
9+
id-token: write
10+
contents: write # in order to create releases
11+
attestations: write
12+
13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.ref }}
15+
cancel-in-progress: true
16+
17+
jobs:
18+
release-contract:
19+
name: Compile Stellar smart contract for production and create release
20+
uses: stellar-expert/soroban-build-workflow/.github/workflows/release.yml@2ff8e0a5a122981b534bfc76851d26d74905c1cc
21+
with:
22+
release_name: ${{ github.ref_name }}
23+
release_description: "Scaffold contract release"
24+
home_domain: "your-domain.dev"
25+
relative_path: "contracts/..."
26+
package: "..."
27+
secrets:
28+
release_token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/dapp-ipfs.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: dApp upload to IPFS
2+
3+
permissions:
4+
contents: read
5+
6+
on:
7+
push:
8+
branches: [dapp_production]
9+
10+
workflow_dispatch:
11+
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
14+
cancel-in-progress: true
15+
16+
jobs:
17+
ipds:
18+
name: Publish dApp on IPFS
19+
runs-on: ubuntu-latest
20+
permissions:
21+
id-token: write
22+
attestations: write
23+
environment:
24+
name: dapp-ipfs
25+
defaults:
26+
run:
27+
working-directory: ./
28+
29+
steps:
30+
- uses: actions/checkout@v6
31+
32+
- name: Install App dependencies
33+
run: npm install
34+
35+
- name: Build app
36+
env:
37+
PUBLIC_STELLAR_NETWORK_PASSPHRASE: ${{ vars.PUBLIC_STELLAR_NETWORK_PASSPHRASE }}
38+
PUBLIC_STELLAR_RPC_URL: ${{ vars.PUBLIC_STELLAR_RPC_URL }}
39+
PUBLIC_PUBLIC_STELLAR_HORIZON_URL: ${{ vars.PUBLIC_PUBLIC_STELLAR_HORIZON_URL }}
40+
run: npm run build
41+
42+
- name: Generate artifact attestation for dist
43+
uses: actions/attest-build-provenance@977bb373ede98d70efdf65b84cb5f73e068dcc2a
44+
with:
45+
subject-path: "./dist/*"
46+
47+
- name: Archive production artifacts
48+
uses: actions/upload-artifact@v5
49+
with:
50+
name: dist
51+
path: |
52+
./dist/*
53+
54+
- uses: storacha/add-to-web3@892505d8e70c79336721485e5500155c17a728e0
55+
id: storacha
56+
with:
57+
path_to_add: "./dist"
58+
secret_key: ${{ secrets.STORACHA_PRINCIPAL }}
59+
proof: ${{ secrets.STORACHA_PROOF }}
60+
61+
- name: Job summary
62+
run: |
63+
echo "### Shipping to IPFS! :rocket:" >> $GITHUB_STEP_SUMMARY
64+
echo "" >> $GITHUB_STEP_SUMMARY
65+
echo "- CID: ${{ steps.storacha.outputs.cid }}" >> "$GITHUB_STEP_SUMMARY"
66+
echo "- URL: ${{ steps.storacha.outputs.url }}" >> "$GITHUB_STEP_SUMMARY"

0 commit comments

Comments
 (0)