diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ea7e125b0..57696f4b4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -57,6 +57,10 @@ 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: @@ -64,6 +68,7 @@ jobs: 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 @@ -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}\"/" \