Debug release action #3
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
# This action will update the CITATION.cff file for new release or hotfix branches | |
name: Release | |
on: | |
push: | |
branches: | |
- 'release/**' | |
- 'hotfix/**' | |
jobs: | |
citation-update: | |
name: Update CITATION.cff | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Autoformat CITATION.cff | |
run: | | |
version=`grep -o '\d\+\.\d\+\.\d\+' package.json` | |
echo $version | |
today=`date +"%Y-%m-%d"` | |
echo $today | |
sed -i "s/^version: [[:digit:]]\{1,\}\.[[:digit:]]\{1,\}\.[[:digit:]]\{1,\}/version: $version/" CITATION.cff | |
sed -i "s/[[:digit:]]\{4\}-[[:digit:]]\{2\}-[[:digit:]]\{2\}/$today/" CITATION.cff | |
git commit -a -m "update version and date in CITATION.cff" | |