diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5912068..db15d7d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 on: - push: - tags: ["v*"] workflow_dispatch: + inputs: + tag: + description: Release tag to attach the packages to, such as v0.1.0 + required: true permissions: contents: write @@ -25,6 +27,8 @@ jobs: GH_TOKEN: ${{ github.token }} steps: - uses: actions/checkout@v4 + with: + ref: ${{ inputs.tag }} - name: Engines run: | brew install zstd @@ -45,9 +49,8 @@ jobs: - name: Packages run: packaging/macos/release.sh 1 - name: Attach to the release - if: startsWith(github.ref, 'refs/tags/') 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 upload "$version" dist/*.dmg --clobber if [ "${{ matrix.arch }}" = arm64 ]; then