Skip to content

rebrand from um to nemo for orca2 (#12) #20

rebrand from um to nemo for orca2 (#12)

rebrand from um to nemo for orca2 (#12) #20

Workflow file for this run

name: ci-release
on:
push:
branches:
- main
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
release:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
env:
GVM_VERSION_FNAME: "version.txt"
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: "calculate release version"
run: |
git pull
if [ -f "${GVM_VERSION_FNAME}" ]
then
GVM_VERSION=$(cat ${GVM_VERSION_FNAME})
GVM_DATE=$(echo ${GVM_VERSION} | cut -d. -f1-2)
GVM_SERIAL=$(echo ${GVM_VERSION} | cut -d. -f3)
NOW_DATE=$(date +%Y.%m)
NOW_SERIAL=0
if [ "${GVM_DATE}" == "${NOW_DATE}" ]
then
NOW_SERIAL=$(expr ${GVM_SERIAL} + 1)
fi
GVM_VERSION="${NOW_DATE}.${NOW_SERIAL}"
else
GVM_VERSION="$(date +%Y.%m).0"
echo "GVM_BOOTSTRAP=1" >> ${GITHUB_ENV}
fi
echo "GVM_VERSION=${GVM_VERSION}" >> ${GITHUB_ENV}
- name: "store release version"
run: |
echo ${{ env.GVM_VERSION }} > ${GVM_VERSION_FNAME}
if [ -n "${GVM_BOOTSTRAP}" ]
then
git add ${GVM_VERSION_FNAME}
fi
git config user.name "GitHub Actions"
git config user.email "actions@users.noreply.github.com"
git commit -am "Automated release for version \"${GVM_VERSION}\""
git push
- name: "perform release"
uses: softprops/action-gh-release@1e07f4398721186383de40550babbdf2b84acfc5
with:
tag_name: ${{ env.GVM_VERSION }}