Skip to content

Update main (on release) #36

Update main (on release)

Update main (on release) #36

Workflow file for this run

name: Update main (on release)
on: create
jobs:
run:
name: Update main
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: main
fetch-depth: 0
submodules: true
- run: |
TAG=${GITHUB_REF##*/}
echo "The triggering tag is ${TAG}"
echo $TAG | grep '[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*' || exit 0
VERSION=$(echo $TAG | grep -o "^[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*")
echo "The version is ${VERSION}"
[ -d ${VERSION} ] || git submodule add https://github.com/geoschem/input-data-catalogs.git ${VERSION}
cd ${VERSION}
git fetch
git checkout $TAG
cd ..
git config user.name github-actions
git config user.email [email protected]
git add .
git commit -m "Updated main for ${VERSION} release"
git push origin main