Create Release #10
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Create Release | |
on: | |
workflow_dispatch: | |
inputs: | |
tag: | |
description: 'The new version to tag, ex: 1.0.5' | |
required: true | |
type: string | |
prerelease: | |
default: true | |
description: Indicator of whether or not this is a prerelease. | |
type: boolean | |
jobs: | |
create-release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: bazel-contrib/setup-bazel@0.8.5 | |
with: | |
bazelisk-cache: true | |
- uses: actions/checkout@v4 | |
with: | |
fetch-tags: true | |
- name: Prepare release | |
run: |- | |
set -euo pipefail | |
PREFIX="asc_swift-${{ inputs.tag }}" | |
ARCHIVE="asc_swift-${{ inputs.tag }}.tar.gz" | |
git archive --format=tar --prefix="${PREFIX}/" "${{ inputs.tag }}" | gzip > $ARCHIVE | |
- name: Release | |
uses: softprops/action-gh-release@v2 | |
with: | |
tag_name: ${{ inputs.tag }} | |
files: "asc_swift-*.tar.gz" | |
fail_on_unmatched_files: true | |
prerelease: ${{ inputs.prerelease }} | |
generate_release_notes: true |