summaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
authorEllie Huxtable <ellie@elliehuxtable.com>2023-04-18 21:51:39 +0100
committerGitHub <noreply@github.com>2023-04-18 21:51:39 +0100
commit0feee3d1899f626ecc7d88a9b220c40e15f28a3f (patch)
tree0dbbbf5cf3e2d3d41f24cf86a35017baaac24f54 /.github
parentcc5b167f925ed2cf7a5eaa3a90c311739260e2ae (diff)
Allow specifying tag to build for workflow_dispatch (#896)
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/release.yaml25
1 files changed, 19 insertions, 6 deletions
diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml
index 78a6fac0..cae51682 100644
--- a/.github/workflows/release.yaml
+++ b/.github/workflows/release.yaml
@@ -6,6 +6,11 @@ env:
on:
workflow_dispatch:
+ inputs:
+ tag:
+ description: 'Tag to build release binaries for'
+ required: true
+ type: string
push:
tags:
- "v*"
@@ -27,8 +32,22 @@ jobs:
- { os: macos-12 , target: x86_64-apple-darwin }
- { os: macos-12 , target: aarch64-apple-darwin }
steps:
+ - name: Check for release
+ id: is-release
+ shell: bash
+ run: |
+ unset IS_RELEASE ; if [[ $GITHUB_REF =~ ^refs/tags/v[0-9].* ]]; then IS_RELEASE='true' ; fi
+ echo "IS_RELEASE=${IS_RELEASE}" >> $GITHUB_OUTPUT
+
+ - name: Checkout source code
+ if: steps.is-release.outputs.IS_RELEASE
+ uses: actions/checkout@v3
+
- name: Checkout source code
+ if: ${{ !steps.is-release.outputs.IS_RELEASE }}
uses: actions/checkout@v3
+ with:
+ ref: ${{ inputs.tag }}
- name: Install prerequisites
shell: bash
@@ -177,12 +196,6 @@ jobs:
name: ${{ steps.debian-package.outputs.DPKG_NAME }}
path: ${{ steps.debian-package.outputs.DPKG_PATH }}
- - name: Check for release
- id: is-release
- shell: bash
- run: |
- unset IS_RELEASE ; if [[ $GITHUB_REF =~ ^refs/tags/v[0-9].* ]]; then IS_RELEASE='true' ; fi
- echo "IS_RELEASE=${IS_RELEASE}" >> $GITHUB_OUTPUT
- name: Publish archives and packages
uses: softprops/action-gh-release@v1