Skip to content

Commit

Permalink
Auto generate build URL for setting download link
Browse files Browse the repository at this point in the history
  • Loading branch information
jurevans committed Oct 12, 2023
1 parent 50ba87f commit 39d105f
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
15 changes: 14 additions & 1 deletion .github/workflows/release-wallet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: Deploy interface and release extension
on:
workflow_dispatch:
inputs:
REF:
required: true
type: string
default: "main"
REACT_APP_NAMADA_ALIAS:
required: true
type: string
Expand Down Expand Up @@ -43,6 +47,8 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
ref: ${{ inputs.REF }}

- name: Set environment variables
id: set-environment-variables
Expand Down Expand Up @@ -81,6 +87,8 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
ref: ${{ inputs.REF }}

- name: Install yarn dependencies
uses: ./.github/actions/yarn-cache
Expand All @@ -96,7 +104,7 @@ jobs:
- name: Install wasm-pack
uses: jetli/[email protected]
with:
version: "v0.10.3"
version: "v0.12.1"

- name: Build the interface
working-directory: ./apps/namada-interface
Expand All @@ -111,6 +119,7 @@ jobs:
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:
Expand All @@ -123,6 +132,8 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
ref: ${{ inputs.REF }}

- name: Install yarn dependencies
uses: ./.github/actions/yarn-cache
Expand Down Expand Up @@ -172,6 +183,8 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
ref: ${{ inputs.REF }}

- name: Install yarn dependencies
uses: ./.github/actions/yarn-cache
Expand Down
7 changes: 6 additions & 1 deletion packages/types/src/chain.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
import { TokenType } from "./tx";

const {
// Load extension download URL from env
REACT_APP_EXTENSION_URL: extensionUrl,
} = process.env;

export type Currency = {
token: string;
symbol: TokenType;
Expand Down Expand Up @@ -30,7 +35,7 @@ export const Extensions: Record<ExtensionKey, ExtensionInfo> = {
alias: "Namada",
id: "namada",
// TODO: Update to most recent release
url: "https://github.com/anoma/namada-interface/releases/tag/v0.1.0-48adf43",
url: extensionUrl || "https://namada.me",
},
keplr: {
alias: "Keplr",
Expand Down

1 comment on commit 39d105f

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.