Skip to content

Commit

Permalink
use branch name for build
Browse files Browse the repository at this point in the history
  • Loading branch information
shanimal08 committed Nov 11, 2024
1 parent f0bdc64 commit 6fb4bcc
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,18 @@ jobs:
run: |
sudo bash ./scripts/check-get-yq.sh
- name: Extract branch name
shell: bash
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
id: extract_branch
- name: Set environment variables for beta builds
if: ${{ ( github.event_name == 'schedule' ) || ( ! startsWith(github.ref, 'refs/heads/release') ) }}
env:
BETA_STRING: '(Beta)'
AIRDROP_BASE_URL: ${{ secrets.BETA_AIRDROP_BASE_URL }}
AIRDROP_API_BASE_URL: ${{ secrets.BETA_AIRDROP_API_BASE_URL }}
AIRDROP_TWITTER_AUTH_URL: ${{ secrets.BETA_AIRDROP_TWITTER_AUTH_URL }}
BETA_BRANCH_NAME: ${{ steps.extract_branch.outputs.branch }}
shell: bash
run: |
#set -xueo pipefail
Expand All @@ -84,7 +89,7 @@ jobs:
yq eval ".version += \"-${BETA_DATE}\"" -i tauri.conf.json
yq eval ".app.windows[0].title = \"Tari Universe ${{ env.BETA_STRING }} | Testnet\"" -i tauri.conf.json
yq eval ".identifier = \"com.tari.universe.beta\"" -i tauri.conf.json
yq eval ".plugins.updater.endpoints = [\"https://raw.githubusercontent.com/tari-project/universe/main/.updater/beta-latest.json\"]" \
yq eval ".plugins.updater.endpoints = [\"https://raw.githubusercontent.com/tari-project/universe/${{ env.BETA_BRANCH_NAME }}/.updater/beta-latest.json\"]" \
-i tauri.conf.json
cat tauri.conf.json
sed -i.bak -E "s/^version\s*=\s*\"([0-9]+\.[0-9]+\.[0-9]+)\"/version = \"\1-${BETA_DATE}\"/" \
Expand Down

0 comments on commit 6fb4bcc

Please sign in to comment.