release testing-ignore-2 #350
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: release | |
run-name: release ${{inputs.version}} | |
defaults: | |
run: | |
shell: bash | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: Release version; e.g. `0.5.19`. We'll create tag `release/${version}`. | |
required: true | |
type: string | |
jobs: | |
build-ucm: | |
uses: ./.github/workflows/bundle-ucm.yaml | |
with: | |
ref: ${{github.ref}} | |
release: | |
name: create release | |
runs-on: ubuntu-20.04 | |
needs: | |
- build-ucm | |
steps: | |
- name: make download dir | |
run: mkdir /tmp/ucm | |
- name: "download artifacts" | |
uses: actions/download-artifact@v4 | |
with: | |
path: /tmp/ucm | |
- name: Create Release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
prev_tag="$( \ | |
gh release view \ | |
--repo unisonweb/unison \ | |
--json tagName -t '{{printf .tagName}}' \ | |
)" | |
if [ -z "$prev_tag" ]; then echo "No previous release found"; exit 1; fi | |
echo "Creating a release from these artifacts:" | |
ls -R /tmp/ucm/**/ucm-*.{zip,tar.gz} | |
gh release create "release/${{inputs.version}}" \ | |
--repo unisonweb/unison \ | |
--target "${{github.ref}}" \ | |
--generate-notes \ | |
--notes-start-tag "${prev_tag}" \ | |
\ | |
/tmp/ucm/**/ucm-*.{zip,tar.gz} |