Skip to content

Prod Release to IPFS #102

Prod Release to IPFS

Prod Release to IPFS #102

name: Prod Release to IPFS
on:
# push:
# branches: [ main ]
workflow_dispatch:
jobs:
build-and-deploy:
if: github.repository == 'crustio/crust-files'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js 18
uses: actions/setup-node@v2
with:
node-version: "18.19.0"
- name: Run install
run: yarn install --frozen-lockfile
- name: Build
run: yarn export
- name: Pin to IPFS
id: upload
uses: crustio/[email protected]
with:
path: './out'
seeds: ${{ secrets.CRUST_SEEDS }}
gateway: 'https://gw.crustfiles.net'
params: 'cid-version=1'
- name: Place storage order on Crust
uses: crustio/[email protected]
continue-on-error: true
timeout-minutes: 2
with:
cid: ${{ steps.upload.outputs.hash }}
seeds: ${{ secrets.CRUST_SEEDS }}
- name: Create a release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
body: |
IPFS CIDV1: ${{ steps.upload.outputs.hash }}
IPFS gateways:
https://${{steps.upload.outputs.hash}}.ipfs.dweb.link/
https://${{steps.upload.outputs.hash}}.ipfs.cf-ipfs.com/
https://crustfiles-xyz.ipns.dweb.link/
https://crustfiles-com.ipns.dweb.link/