Explicitly set which ubuntu platform to run GitHub actions on. #138
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: | |
push: | |
tags: | |
- 'v*' | |
jobs: | |
create_release: | |
if: github.repository == 'MusculoskeletalAtlasProject/mapclient' | |
name: create_release | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Determine release properties | |
shell: bash | |
id: release_properties | |
run: | | |
tag=${GITHUB_REF#refs/tags/} | |
OIFS=$IFS | |
IFS='.' read -ra split <<< "$tag" | |
IFS=$OIFS | |
count=${#split[@]} | |
[[ ${#split[@]} -eq 4 ]] && pre_release=true || pre_release=false | |
[[ ${#split[@]} -eq 4 ]] && body="Pre-release of version $tag." || body="Version $tag." | |
echo "PRE_RELEASE=$pre_release" | |
echo "PRE_RELEASE=$pre_release" >> $GITHUB_OUTPUT | |
echo "BODY=$body" | |
echo "BODY=$body" >> $GITHUB_OUTPUT | |
- name: create | |
uses: softprops/action-gh-release@v1 | |
id: create_release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
draft: false | |
prerelease: ${{ steps.release_properties.outputs.pre_release }} | |
body: ${{ steps.release_properties.outputs.body }} | |