Skip to content

Commit

Permalink
explanation
Browse files Browse the repository at this point in the history
  • Loading branch information
tomjaguarpaw committed Oct 13, 2023
1 parent d5f85c0 commit 98b1faf
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
# Note [environment variables]
#
# It seems absurd, but the syntax for creating environment variables
# differs between Windows and Linux/MacOS. See
#
# https://docs.github.com/en/actions/learn-github-actions/variables
#
# In Linux/MacOS we have to use
#
# run: echo "VARNAME=content" >> "$GITHUB_ENV"
#
# whereas in Windows we have to use
#
# run: echo "VARNAME=content" >> $env:GITHUB_ENV

name: Stan Release

on:
Expand Down Expand Up @@ -84,11 +99,12 @@ jobs:
mkdir dist
cabal install exe:stan --install-method=copy --overwrite-policy=always --installdir=dist
# See Note [environment variables]
- if: matrix.os == 'windows-latest'
name: Set binary path name on Windows
# https://stackoverflow.com/a/74547513/997606
run: echo "BINARY_PATH=./dist/stan.exe" >> $env:GITHUB_ENV

# See Note [environment variables]
- if: matrix.os != 'windows-latest'
name: Set binary path name not on Windows
run: echo "BINARY_PATH=./dist/stan" >> "$GITHUB_ENV"
Expand All @@ -104,12 +120,14 @@ jobs:
name: release_url
path: release_url

# See Note [environment variables]
- if: matrix.os == 'windows-latest'
name: Get Release File Name & Upload URL on Widows
id: get_release_info
run: |
echo "upload_url=$(cat release_url/release_url.txt)" >> $env:GITHUB_OUTPUT
# See Note [environment variables]
- if: matrix.os != 'windows-latest'
name: Get Release File Name & Upload URL not on Widows
id: get_release_info
Expand Down

0 comments on commit 98b1faf

Please sign in to comment.