Skip to content

double printing of logfile fix #52

double printing of logfile fix

double printing of logfile fix #52

Workflow file for this run

name: Create Release
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
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/[email protected]
with:
repository: "coin-or/Cbc"
latest: true
fileName: "*w64-msvc17*.zip"
out-file-path: "fireanalyticstoolbox/cbc"
extract: true
# - name: CheckoutC2F-W
# uses: actions/checkout@master
# with:
# repository: "fire2a/C2F-W"
# path: "fireanalyticstoolbox/simulator/C2F"
# sparse-checkout: |
# Cell2FireC/Cell2Fire.exe
# Cell2FireC/Cell2Fire.Linux.x86_64
# Cell2FireC/Cell2Fire.Darwin.x86_64
# Cell2FireC/Cell2Fire.Darwin.arm64
# Cell2FireC/cell2fire.py
# Cell2FireC/DataGeneratorC.py
# sparse-checkout-cone-mode: false
- name: CheckoutFire2a-lib
uses: actions/checkout@master
with:
repository: "fire2a/fire2a-lib"
path: "fireanalyticstoolbox/fire2a"
sparse-checkout: |
src/fire2a/raster.py
src/fire2a/utils.py
src/fire2a/__init__.py
sparse-checkout-cone-mode: false
- name: download cell2fire
uses: robinraju/[email protected]
with:
repository: "fire2a/C2F-W"
latest: true
fileName: "*.zip"
out-file-path: "fireanalyticstoolbox/simulator/tmp"
extract: true
tarBall: false
zipBall: false
- name: git archive
run: |
rm fireanalyticstoolbox/cbc/*w64-msvc17*.zip
mkdir fireanalyticstoolbox/simulator/C2F
mv fireanalyticstoolbox/simulator/tmp/C2F/Cell2FireC fireanalyticstoolbox/simulator/tmp/C2F/LICENSE fireanalyticstoolbox/simulator/tmp/C2F/README.md fireanalyticstoolbox/simulator/C2F
rm -rf fireanalyticstoolbox/simulator/tmp
rm -f fireanalyticstoolbox/simulator/C2F/Cell2FireC/makefile*
rm -f fireanalyticstoolbox/simulator/C2F/Cell2FireC/*cpp
rm -f fireanalyticstoolbox/simulator/C2F/Cell2FireC/*h
rm -f fireanalyticstoolbox/simulator/C2F/Cell2FireC/*sln
rm -f fireanalyticstoolbox/simulator/C2F/Cell2FireC/*vcxproj*
mv fireanalyticstoolbox/fire2a/src/fire2a/* fireanalyticstoolbox/fire2a
rm -rf fireanalyticstoolbox/fire2a/.git* fireanalyticstoolbox/fire2a/src
grep -Rl --include=*py "from fire2a" | tee will.change | xargs -I {} sed -i "s/^from fire2a/from .fire2a/" {}
cat will.change
rm will.change
git add fireanalyticstoolbox/cbc
git add fireanalyticstoolbox/simulator/C2F
git add fireanalyticstoolbox/fire2a
lestash=`git stash create`
git archive --output "fireanalyticstoolbox_${{ github.ref_name }}.zip" $lestash fireanalyticstoolbox
- name: Create Release
uses: ncipollo/[email protected]
with:
artifacts: "fireanalyticstoolbox_${{ github.ref_name }}.zip"
token: ${{ secrets.GITHUB_TOKEN }}