IPFS Release #4
This file contains 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
name: IPFS Release | |
on: | |
workflow_dispatch: | |
permissions: | |
contents: write | |
env: | |
ipfs_folder: 'out' | |
is_create_release: ${{ github.ref_name == 'main' }} | |
jobs: | |
prepare-for-ipfs: | |
runs-on: ubuntu-latest | |
environment: IPFS Release | |
outputs: | |
ipfs_folder: ${{ env.ipfs_folder }} | |
is_create_release: ${{ env.is_create_release }} | |
tag: ${{ steps.build-info.outputs.tag }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
fetch-depth: 0 | |
fetch-tags: true | |
- name: Install node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: 'yarn' | |
- name: Set tag, commit and branch name | |
if: env.is_create_release == 'true' | |
id: build-info | |
uses: lidofinance/actions/.github/actions/build-info@main | |
with: | |
BRANCH_NAME: ${{ github.ref_name }} | |
- name: Install dependencies | |
run: | | |
yarn install --frozen-lockfile | |
- name: Build | |
run: | | |
yarn build-ipfs | |
env: | |
DEFAULT_CHAIN: ${{ vars.DEFAULT_CHAIN }} | |
SUPPORTED_CHAINS: ${{ vars.SUPPORTED_CHAINS }} | |
WIDGET_API_BASE_PATH_FOR_IPFS: ${{ vars.WIDGET_API_BASE_PATH_FOR_IPFS }} | |
REWARDS_BACKEND_BASE_PATH: ${{ vars.REWARDS_BACKEND_BASE_PATH }} | |
WQ_API_BASE_PATH: ${{ vars.WQ_API_BASE_PATH }} | |
ETH_API_BASE_PATH: ${{ vars.ETH_API_BASE_PATH }} | |
PREFILL_UNSAFE_EL_RPC_URLS_1: ${{ secrets.PREFILL_UNSAFE_EL_RPC_URLS_1 }} | |
WALLETCONNECT_PROJECT_ID: ${{ secrets.WALLETCONNECT_PROJECT_ID }} | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ env.ipfs_folder }} | |
path: ${{ env.ipfs_folder }} | |
retention-days: 1 | |
ipfs-pinning: | |
needs: prepare-for-ipfs | |
uses: lidofinance/actions/.github/workflows/ci-ipfs.yml@main | |
with: | |
ipfs_folder: ${{ needs.prepare-for-ipfs.outputs.ipfs_folder }} | |
current_branch: ${{ github.ref_name }} | |
IS_CREATE_RELEASE: ${{ needs.prepare-for-ipfs.outputs.is_create_release == 'true' }} | |
tag: ${{ needs.prepare-for-ipfs.outputs.tag }} | |
FILEBASE_BUCKET_NAME: ${{ vars.FILEBASE_BUCKET_NAME_PROD }} | |
secrets: | |
W3S_TOKEN: ${{ secrets.W3S_TOKEN_PROD }} | |
W3S_PROOF: ${{ secrets.W3S_PROOF_PROD }} | |
GW3_TOKEN: ${{ secrets.GW3_TOKEN_PROD }} | |
GW3_ACCESS_KEY: ${{ secrets.GW3_ACCESS_KEY_PROD }} | |
FILEBASE_TOKEN: ${{ secrets.FILEBASE_TOKEN_PROD }} |