Skip to content

Commit

Permalink
chore(actions): custom branch or tag
Browse files Browse the repository at this point in the history
  • Loading branch information
0PandaDEV authored Nov 15, 2024
1 parent 617b002 commit 5c98b7a
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ on:
pull_request:
branches:
- main
workflow_dispatch:
inputs:
ref:
description: 'Branch or tag to build e.g. main or v0.1.0'
required: true
type: string
default: 'main'

jobs:
prepare:
Expand All @@ -15,6 +22,8 @@ jobs:
version: ${{ steps.get_version.outputs.VERSION }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.ref || 'main' }}
- name: Get version
id: get_version
run: echo "VERSION=$(node -p "require('./src-tauri/tauri.conf.json').version")" >> $GITHUB_OUTPUT
Expand All @@ -35,6 +44,8 @@ jobs:
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.ref || 'main' }}
- name: Redact Sensitive Information
run: |
function redact_output {
Expand Down Expand Up @@ -119,6 +130,8 @@ jobs:
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.ref || 'main' }}
- uses: actions/setup-node@v4
with:
node-version: 20
Expand Down Expand Up @@ -161,6 +174,8 @@ jobs:
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.ref || 'main' }}
- uses: actions/setup-node@v4
with:
node-version: 20
Expand Down

0 comments on commit 5c98b7a

Please sign in to comment.