Skip to content

Add backup alternative to getting remote repo if the primary way fails. #121

Add backup alternative to getting remote repo if the primary way fails.

Add backup alternative to getting remote repo if the primary way fails. #121

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