Repository navigation
feat: gzipped arweave deploys and a staging channel on arweave #2343
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
6158dbb
docs: library pages design v2 and implementation plan
vilenarios 727cd24
feat: gzipped arweave deploys and a staging channel on arweave
vilenarios dc4cb9a
docs: library pages phase 0 is #2343
vilenarios 55d6cbe
fix: warm library bundles through turbo-gateway.com and ardrive.net only
vilenarios 8ffff73
fix: staging uploads to arweave only when run by hand
vilenarios 54ac384
docs: ar-io.dev is turbo's development sandbox gateway
vilenarios 094d1fe
fix: address coderabbit review on library pages phase 0
vilenarios 3f34d42
fix: run the arweave deploys on a patched node
vilenarios 14f8a28
chore: deploy with ar-io-deploy v2.1.2
vilenarios File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,85 @@ | ||
| name: 'Staging build to Arweave' | ||
|
|
||
| # Uploads a staging build of the chosen branch to Arweave, gzipped, for | ||
| # trying library mode on Arweave before a release (docs/LIBRARY_PAGES.md). | ||
| # Manual only: every run is paid for by the deploy wallet, and pushes to dev | ||
| # deploy staging.ardrive.io through staging.yaml, not here. There is no ArNS | ||
| # name; the manifest ID is in the job summary. | ||
| on: | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| upload: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| concurrency: | ||
| group: staging-arweave | ||
| cancel-in-progress: false | ||
| # Every action is pinned by commit: this job holds DEPLOY_KEY, and any | ||
| # step before the upload can change what it uploads. | ||
| steps: | ||
| - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| # Set Flutter version from fvm | ||
| - uses: kuhnroyal/flutter-fvm-config-action@6ffa30473b346f7d7c63cf9e03e6a886f940a72b # v1.2.0 | ||
|
|
||
| # Install Flutter | ||
| - uses: subosito/flutter-action@1a449444c387b1966244ae4d4f8c696479add0b2 # v2.23.0 | ||
| with: | ||
| channel: ${{ env.FLUTTER_CHANNEL }} | ||
| flutter-version: ${{ env.FLUTTER_VERSION }} | ||
|
|
||
| - name: Install script_runner | ||
| run: flutter pub global activate script_runner | ||
|
|
||
| # The staging build, without source maps: on Arweave they would only | ||
| # add 11 MB to pay for. | ||
| - name: Build app | ||
| run: | | ||
| scr setup | ||
| flutter config --enable-web | ||
| flutter build web --dart-define=environment=staging --release --pwa-strategy=none --no-web-resources-cdn --dart2js-optimization=O1 | ||
|
|
||
| # An exact, patched Node: '22' alone can resolve to an older 22.x the | ||
| # runner image already has, and the CLI decodes brotli responses | ||
| # (CVE-2026-111497, fixed in 22.23.4 and 24.22.1). | ||
| - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 | ||
| with: | ||
| node-version: '24.22.1' | ||
|
|
||
| # The action has no upload-only mode (it always updates an ArNS name), | ||
| # so this runs the CLI at an exact version. --incremental reuses files | ||
| # this wallet already uploaded, so a run pays mostly for main.dart.js. | ||
| - name: Upload to Arweave | ||
| id: upload | ||
| env: | ||
| DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }} | ||
| NO_COLOR: '1' | ||
| run: | | ||
| # Without a `shell:`, steps run without pipefail, and `tee` would | ||
| # hide a failed upload. | ||
| set -o pipefail | ||
| # The CLI takes an Arweave JWK base64-encoded, as the action does. | ||
| if [[ "$DEPLOY_KEY" =~ ^\{.*\}$ ]]; then | ||
| DEPLOY_KEY=$(printf '%s' "$DEPLOY_KEY" | base64 -w0) | ||
| fi | ||
| export DEPLOY_KEY | ||
| npx --yes @ar.io/deploy@2.1.2 upload --deploy-folder build/web \ | ||
| --compress gzip --incremental | tee upload.log | ||
| id=$(sed -n 's/^Tx ID: \([A-Za-z0-9_-]\{43\}\)$/\1/p' upload.log | head -1) | ||
| if [ -z "$id" ]; then | ||
| echo "::error::The upload printed no Tx ID." | ||
| exit 1 | ||
| fi | ||
| echo "tx-id=$id" >> "$GITHUB_OUTPUT" | ||
| echo "Staging on Arweave ($GITHUB_REF_NAME, $GITHUB_SHA): [$id](https://turbo-gateway.com/$id/)" >> "$GITHUB_STEP_SUMMARY" | ||
|
|
||
| # A miss here does not undo the upload, so it is reported, not fatal. | ||
| - name: Warm the gateways | ||
| continue-on-error: true | ||
| env: | ||
| MANIFEST_ID: ${{ steps.upload.outputs.tx-id }} | ||
| run: bash tool/warm_arweave_manifest.sh "$MANIFEST_ID" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.