fix #118
Workflow file for this run
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
name: Create Release | |
on: | |
push: | |
tags: | |
- 'v[0-9]+.[0-9]+.[0-9]+' | |
- 'v[0-9]+.[0-9]+.[0-9]+-beta' | |
permissions: | |
contents: write | |
jobs: | |
build-n-publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@master | |
- name: version bump | |
run: | | |
VERSION=${GITHUB_REF_NAME#v} | |
echo "version is ${VERSION}" | |
sed -i -e "s/version=0.0.1/version=${VERSION}/" fireanalyticstoolbox/metadata.txt | |
git add fireanalyticstoolbox/metadata.txt | |
- name: download cbc | |
uses: robinraju/release-downloader@v1.11 | |
with: | |
repository: "coin-or/Cbc" | |
latest: true | |
fileName: "*w64-msvc17*.zip" | |
out-file-path: "fireanalyticstoolbox/cbc" | |
extract: true | |
tarBall: false | |
zipBall: false | |
- name: download cell2fire | |
uses: robinraju/release-downloader@v1.11 | |
with: | |
repository: "fire2a/C2F-W" | |
latest: true | |
fileName: " Cell2FireW_v*.*.*.zip" | |
out-file-path: "fireanalyticstoolbox/simulator" | |
extract: true | |
tarBall: false | |
zipBall: false | |
- name: git archive | |
run: | | |
rm -f fireanalyticstoolbox/cbc/*.zip | |
rm -rf fireanalyticstoolbox/cbc/include | |
rm -rf fireanalyticstoolbox/cbc/share | |
rm -f fireanalyticstoolbox/simulator/C2F/Cell2Fire/*.h | |
rm -f fireanalyticstoolbox/simulator/C2F/Cell2Fire/*.cpp | |
rm -f fireanalyticstoolbox/simulator/C2F/Cell2Fire/makefile* | |
rm -f fireanalyticstoolbox/simulator/C2F/Cell2Fire/Cell2Fire.sln* | |
rm -f fireanalyticstoolbox/simulator/C2F/Cell2Fire/Cell2Fire.vcxproj* | |
git add fireanalyticstoolbox/cbc | |
git add fireanalyticstoolbox/simulator/C2F | |
astash=`git stash create` | |
git archive --output "fireanalyticstoolbox_${{ github.ref_name }}.zip" $astash fireanalyticstoolbox | |
- name: Create Release | |
uses: ncipollo/release-action@v1.12.0 | |
with: | |
artifacts: "fireanalyticstoolbox_${{ github.ref_name }}.zip" | |
token: ${{ secrets.GITHUB_TOKEN }} | |
draft: true |