Skip to content

Merge pull request #119 from hsorby/main #129

Merge pull request #119 from hsorby/main

Merge pull request #119 from hsorby/main #129

Workflow file for this run

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 }}