properly set env

This commit is contained in:
Anton-4 2023-01-28 15:08:32 +01:00
parent 20f16893cb
commit 4969fbc287
No known key found for this signature in database
GPG Key ID: 0971D718C0A9B937

View File

@ -1,14 +1,8 @@
on:
pull_request:
env:
ARCHIVE_FORMAT: "tar.gz"
workflow_dispatch:
env:
ARCHIVE_FORMAT: "tar.br"
release:
types: [edited]
env:
ARCHIVE_FORMAT: "tar.gz" # gz for quick test, br takes longer
# this cancels workflows currently in progress if you start a new one
concurrency:
@ -128,15 +122,23 @@ jobs:
- run: cp macos-x86_64-files/* ./basic-cli/src
# gz for quick test, br takes longer
- run: |
if [ "$GITHUB_EVENT_NAME" == 'workflow_dispatch' ]; then
echo "ARCHIVE_FORMAT=\"tar.br\"" >> "$GITHUB_ENV"
else
echo "ARCHIVE_FORMAT=\"tar.gz\"" >> "$GITHUB_ENV"
fi
- run: echo $ARCHIVE_FORMAT
- run: echo ${ARCHIVE_FORMAT}
- run: echo ${{ env.ARCHIVE_FORMAT }}
- run: ./roc_nightly/roc build --bundle=${ARCHIVE_FORMAT} ./basic-cli/src/main.roc
- run: ./roc_nightly/roc build --bundle=${{ env.ARCHIVE_FORMAT }} ./basic-cli/src/main.roc
- run: echo "TAR_FILENAME=$(ls -d basic-cli/src/* | grep '${ARCHIVE_FORMAT}')" >> $GITHUB_ENV
- run: echo "TAR_FILENAME=$(ls -d basic-cli/src/* | grep '${{ env.ARCHIVE_FORMAT }}')" >> $GITHUB_ENV
- name: Upload platform archive
uses: actions/upload-artifact@v3