Release workflow runs for a chosen tag
This commit is contained in:
1 file changed
+8
-5
@@ -1,10 +1,12 @@
|
|||||||
# On a version tag: macOS apps attached to its release.
|
# Builds macOS apps for a release tag and attaches them.
|
||||||
name: release
|
name: release
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
|
||||||
tags: ["v*"]
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
tag:
|
||||||
|
description: Release tag to attach the packages to, such as v0.1.0
|
||||||
|
required: true
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
@@ -25,6 +27,8 @@ jobs:
|
|||||||
GH_TOKEN: ${{ github.token }}
|
GH_TOKEN: ${{ github.token }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
ref: ${{ inputs.tag }}
|
||||||
- name: Engines
|
- name: Engines
|
||||||
run: |
|
run: |
|
||||||
brew install zstd
|
brew install zstd
|
||||||
@@ -45,9 +49,8 @@ jobs:
|
|||||||
- name: Packages
|
- name: Packages
|
||||||
run: packaging/macos/release.sh 1
|
run: packaging/macos/release.sh 1
|
||||||
- name: Attach to the release
|
- name: Attach to the release
|
||||||
if: startsWith(github.ref, 'refs/tags/')
|
|
||||||
run: |
|
run: |
|
||||||
version=${GITHUB_REF_NAME}
|
version=${{ inputs.tag }}
|
||||||
gh release view "$version" >/dev/null 2>&1 || gh release create "$version" --title "Ely Office $version" --notes "Built by release.yml."
|
gh release view "$version" >/dev/null 2>&1 || gh release create "$version" --title "Ely Office $version" --notes "Built by release.yml."
|
||||||
gh release upload "$version" dist/*.dmg --clobber
|
gh release upload "$version" dist/*.dmg --clobber
|
||||||
if [ "${{ matrix.arch }}" = arm64 ]; then
|
if [ "${{ matrix.arch }}" = arm64 ]; then
|
||||||
|
|||||||
Reference in new issue
Block a user