Skip to content

Release extension

Release extension #53

Workflow file for this run

name: Deploy faucet
on:
workflow_dispatch:
inputs:
REF:
required: true
type: string
default: "main"
REACT_APP_FAUCET_API_URL:
type: string
default: "http://127.0.0.1:5000"
REACT_APP_FAUCET_API_ENDPOINT:
type: string
default: "/api/v1/faucet"
REACT_APP_FAUCET_LIMIT:
type: string
default: "1000"
REACT_APP_PROXY_PORT:
type: string
default: "1234"
env:
CI: false
jobs:
build-faucet:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
ref: ${{ inputs.REF }}
- name: Print workflow inputs
shell: node {0} >> $GITHUB_STEP_SUMMARY
run: |
const json = JSON.parse(process.env.JSON_INPUTS);
Object.entries(json).forEach(([key, value]) =>
console.log(`${key}: ${value}`));
env:
JSON_INPUTS: ${{ toJSON(github.event.inputs) }}
# - name: Install yarn dependencies
# uses: ./.github/actions/yarn-cache
# - name: Build the interface
# working-directory: ./apps/namada-interface
# run: yarn build
# env:
# REACT_APP_NAMADA_ALIAS: ${{ inputs.REACT_APP_NAMADA_ALIAS }}
# REACT_APP_NAMADA_CHAIN_ID: ${{ inputs.REACT_APP_NAMADA_CHAIN_ID }}
# REACT_APP_NAMADA_URL: ${{ inputs.REACT_APP_NAMADA_URL }}
# REACT_APP_COSMOS_ALIAS: ${{ inputs.REACT_APP_COSMOS_ALIAS }}
# REACT_APP_COSMOS_CHAIN_ID: ${{ inputs.REACT_APP_COSMOS_CHAIN_ID }}
# REACT_APP_COSMOS_URL: ${{ inputs.REACT_APP_COSMOS_URL }}
# REACT_APP_ETH_ALIAS: ${{ inputs.REACT_APP_ETH_ALIAS }}
# REACT_APP_ETH_CHAIN_ID: ${{ inputs.REACT_APP_ETH_CHAIN_ID }}
# REACT_APP_ETH_URL: ${{ inputs.REACT_APP_ETH_URL }}
# REACT_APP_EXTENSION_URL: https://github.com/anoma/namada-interface/releases/tag/${{ needs.setup.outputs.VERSION }}/
# build-interface:
# if: false
# needs: setup
# runs-on: ubuntu-latest
# steps:
# - name: Checkout repository
# uses: actions/checkout@v3
# with:
# ref: ${{ inputs.REF }}
# - name: Install yarn dependencies
# uses: ./.github/actions/yarn-cache
# - name: Restore Rust cache
# uses: ./.github/actions/rust-cache
# with:
# cache-name: build
# - name: Install protoc
# run: sudo apt-get install -y protobuf-compiler
# - name: Build the interface
# working-directory: ./apps/namada-interface
# run: yarn build
# env:
# REACT_APP_NAMADA_ALIAS: ${{ inputs.REACT_APP_NAMADA_ALIAS }}
# REACT_APP_NAMADA_CHAIN_ID: ${{ inputs.REACT_APP_NAMADA_CHAIN_ID }}
# REACT_APP_NAMADA_URL: ${{ inputs.REACT_APP_NAMADA_URL }}
# REACT_APP_COSMOS_ALIAS: ${{ inputs.REACT_APP_COSMOS_ALIAS }}
# REACT_APP_COSMOS_CHAIN_ID: ${{ inputs.REACT_APP_COSMOS_CHAIN_ID }}
# REACT_APP_COSMOS_URL: ${{ inputs.REACT_APP_COSMOS_URL }}
# REACT_APP_ETH_ALIAS: ${{ inputs.REACT_APP_ETH_ALIAS }}
# REACT_APP_ETH_CHAIN_ID: ${{ inputs.REACT_APP_ETH_CHAIN_ID }}
# REACT_APP_ETH_URL: ${{ inputs.REACT_APP_ETH_URL }}
# REACT_APP_EXTENSION_URL: https://github.com/anoma/namada-interface/releases/tag/${{ needs.setup.outputs.VERSION }}/
# - uses: actions/upload-artifact@v3
# with:
# name: namada-interface
# path: ./apps/namada-interface/build
# release:
# if: false
# needs:
# [setup, build-interface, build-extension-chrome, build-extension-firefox]
# runs-on: ubuntu-latest
# steps:
# - name: Download interface build
# uses: actions/download-artifact@v3
# with:
# name: namada-interface
# path: ./namada-interface
# - name: Download Chrome extension build
# uses: actions/download-artifact@v3
# with:
# name: namada-extension-chrome
# path: ./namada-extension-chrome
# - name: Download Firefox extension build
# uses: actions/download-artifact@v3
# with:
# name: namada-extension-firefox
# path: ./namada-extension-firefox
# - name: Get extension filenames
# id: get-filenames
# run: |
# echo "CHROME_FILENAME=$(ls -1 ./namada-extension-chrome)" >> "$GITHUB_OUTPUT"
# echo "FIREFOX_FILENAME=$(ls -1 ./namada-extension-firefox)" >> "$GITHUB_OUTPUT"
# - name: Deploy interface to Netlify
# uses: nwtgck/[email protected]
# with:
# publish-dir: ./namada-interface
# production-branch: main
# github-token: ${{ secrets.GITHUB_TOKEN }}
# deploy-message: "Deployed release ${{ needs.setup.outputs.VERSION }}"
# env:
# NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_ACCESS_TOKEN_WALLET_PREVIEW }}
# NETLIFY_SITE_ID: 2380782e-9b20-477a-bc27-b4e9d05e16f3
# - name: Make release body text
# run: |
# echo "REACT_APP_NAMADA_ALIAS: $REACT_APP_NAMADA_ALIAS" >> RELEASE
# echo "REACT_APP_NAMADA_CHAIN_ID: $REACT_APP_NAMADA_CHAIN_ID" >> RELEASE
# echo "REACT_APP_NAMADA_URL: $REACT_APP_NAMADA_URL" >> RELEASE
# echo "REACT_APP_COSMOS_ALIAS: $REACT_APP_COSMOS_ALIAS" >> RELEASE
# echo "REACT_APP_COSMOS_CHAIN_ID: $REACT_APP_COSMOS_CHAIN_ID" >> RELEASE
# echo "REACT_APP_COSMOS_URL: $REACT_APP_COSMOS_URL" >> RELEASE
# echo "REACT_APP_ETH_ALIAS: $REACT_APP_ETH_ALIAS" >> RELEASE
# echo "REACT_APP_ETH_CHAIN_ID: $REACT_APP_ETH_CHAIN_ID" >> RELEASE
# echo "REACT_APP_ETH_URL: $REACT_APP_ETH_URL" >> RELEASE
# env:
# REACT_APP_NAMADA_ALIAS: ${{ inputs.REACT_APP_NAMADA_ALIAS }}
# REACT_APP_NAMADA_CHAIN_ID: ${{ inputs.REACT_APP_NAMADA_CHAIN_ID }}
# REACT_APP_NAMADA_URL: ${{ inputs.REACT_APP_NAMADA_URL }}
# REACT_APP_COSMOS_ALIAS: ${{ inputs.REACT_APP_COSMOS_ALIAS }}
# REACT_APP_COSMOS_CHAIN_ID: ${{ inputs.REACT_APP_COSMOS_CHAIN_ID }}
# REACT_APP_COSMOS_URL: ${{ inputs.REACT_APP_COSMOS_URL }}
# REACT_APP_ETH_ALIAS: ${{ inputs.REACT_APP_ETH_ALIAS }}
# REACT_APP_ETH_CHAIN_ID: ${{ inputs.REACT_APP_ETH_CHAIN_ID }}
# REACT_APP_ETH_URL: ${{ inputs.REACT_APP_ETH_URL }}
# - name: Create release
# id: create-release
# uses: actions/create-release@v1
# env:
# GITHUB_TOKEN: ${{ github.token }}
# with:
# release_name: ${{ needs.setup.outputs.VERSION }}
# tag_name: ${{ needs.setup.outputs.VERSION }}
# body_path: ./RELEASE
# - name: Add Chrome extension to release
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ github.token }}
# with:
# upload_url: ${{ steps.create-release.outputs.upload_url }}
# asset_path: ./namada-extension-chrome/${{ steps.get-filenames.outputs.CHROME_FILENAME }}
# asset_name: namada-extension-chrome_${{ needs.setup.outputs.VERSION }}.zip
# asset_content_type: application/zip
# - name: Add Firefox extension to release
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ github.token }}
# with:
# upload_url: ${{ steps.create-release.outputs.upload_url }}
# asset_path: ./namada-extension-firefox/${{ steps.get-filenames.outputs.FIREFOX_FILENAME }}
# asset_name: namada-extension-firefox_${{ needs.setup.outputs.VERSION }}.zip
# asset_content_type: application/zip