Fix AudioSample loop() #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: "tag -> create release" | |
on: | |
push: | |
tags: [ '*' ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
# need this for figuring out the branch name | |
# (see https://stackoverflow.com/questions/63745613/how-to-get-a-branch-name-on-github-action-when-push-on-a-tag) | |
fetch-depth: 0 | |
- name: Get branch name | |
id: branch-name | |
run: | | |
raw=$(git branch -r --contains ${{ github.ref }}) | |
branch=${raw##*/} | |
echo "branch=$branch" >> $GITHUB_OUTPUT | |
- name: Set up build environment and dependencies | |
uses: ./.github/actions/setup | |
- name: Build and package library with Ant | |
run: ant dist | |
- name: "v* tags only: create version release draft" | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/v') | |
with: | |
draft: true | |
generate_release_notes: true | |
files: | | |
../sound.zip | |
../sound.txt | |
- name: "`latest` tag only: build latest library download release" | |
uses: softprops/action-gh-release@v1 | |
if: github.ref == 'refs/tags/latest' | |
# just override the assets, otherwise leave the existing release unchanged | |
with: | |
files: | | |
../sound.zip | |
../sound.txt | |
- name: "all other tags: create preliminary test build release" | |
uses: softprops/action-gh-release@v1 | |
if: github.ref != 'refs/tags/latest' && !startsWith(github.ref, 'refs/tags/v') | |
with: | |
name: ${{ github.ref_name }} dev build | |
prerelease: true | |
body: Dev build of commit ${{ github.sha }} by ${{ github.actor }} from the [${{ steps.branch-name.outputs.branch }}](https://github.com/${{ github.repository }}/tree/${{ steps.branch-name.outputs.branch }}) branch | |
generate_release_notes: true | |
files: ../sound.zip | |