Release #21
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 | |
on: | |
workflow_run: | |
workflows: [Rust] | |
types: [completed] | |
branches: [ "master" ] | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
permissions: | |
contents: write | |
steps: | |
- uses: dawidd6/action-download-artifact@v2 | |
with: | |
workflow: rust.yml | |
- run: | | |
cp lmi-debian/lilypond-midi-input_debian . | |
cp lmi-archlinux/lilypond-midi-input_archlinux . | |
cp -r lmi-archlinux/changelog . | |
- name: Get version | |
id: version | |
run: | | |
sudo apt install -y libportmidi0 | |
chmod +x lilypond-midi-input_debian | |
echo "VERSION=v$(./lilypond-midi-input_debian --version | grep -oP '[0-9]+\.[0-9]+\.[0-9]+$')" >> $GITHUB_OUTPUT | |
- uses: mukunku/tag-exists-action@v1.4.0 | |
id: checkTag | |
with: | |
tag: ${{ steps.version.outputs.VERSION }} | |
- name: Verify tag does not exist yet | |
run: | | |
case ${{ steps.checkTag.outputs.exists }} in | |
false) echo "Tag does not exist yet";; | |
true) echo "Tag already exists! Did you forget to update it?"; exit 1;; | |
*) echo "Unknown check tag output"; exit 2;; | |
esac | |
- name: Create CHANGELOG.latest file | |
run: cp "$(ls -v changelog/* | tail -1)" CHANGELOG.latest | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
tag_name: ${{ steps.version.outputs.VERSION }} | |
body_path: CHANGELOG.latest | |
files: | | |
lilypond-midi-input_debian | |
lilypond-midi-input_archlinux | |