mirror of
https://github.com/atuinsh/atuin.git
synced 2024-12-27 09:29:24 +01:00
Allow specifying tag to build for workflow_dispatch (#896)
This commit is contained in:
parent
cc5b167f92
commit
0feee3d189
25
.github/workflows/release.yaml
vendored
25
.github/workflows/release.yaml
vendored
@ -6,6 +6,11 @@ env:
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
tag:
|
||||||
|
description: 'Tag to build release binaries for'
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- "v*"
|
- "v*"
|
||||||
@ -27,9 +32,23 @@ jobs:
|
|||||||
- { os: macos-12 , target: x86_64-apple-darwin }
|
- { os: macos-12 , target: x86_64-apple-darwin }
|
||||||
- { os: macos-12 , target: aarch64-apple-darwin }
|
- { os: macos-12 , target: aarch64-apple-darwin }
|
||||||
steps:
|
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
|
- name: Checkout source code
|
||||||
|
if: steps.is-release.outputs.IS_RELEASE
|
||||||
uses: actions/checkout@v3
|
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
|
- name: Install prerequisites
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
@ -177,12 +196,6 @@ jobs:
|
|||||||
name: ${{ steps.debian-package.outputs.DPKG_NAME }}
|
name: ${{ steps.debian-package.outputs.DPKG_NAME }}
|
||||||
path: ${{ steps.debian-package.outputs.DPKG_PATH }}
|
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
|
- name: Publish archives and packages
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
|
Loading…
Reference in New Issue
Block a user