Skip to content

Commit a9562c9

Browse files
committed
added new release: option
the point is to pass the appropriate `--release` flag to our build script, when building an official or nightly release
1 parent 501aeb8 commit a9562c9

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

action.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ inputs:
4141
artifacts_only:
4242
description: 'Skip environment setup, just download and upload artifacts (only works with do=fetch)'
4343
default: 'false'
44+
release:
45+
description: 'Make an official release (compile mode only)'
46+
default: 'false'
4447

4548
runs:
4649
using: "composite"
@@ -120,6 +123,7 @@ runs:
120123
echo "support=$detected_support" >> $GITHUB_ENV
121124
echo "src=${{ inputs.src }}" >> $GITHUB_ENV
122125
echo "metadata=${{ inputs.metadata }}" >> $GITHUB_ENV
126+
echo "release=${{ inputs.release }}" >> $GITHUB_ENV
123127
shell: bash
124128

125129
- name: Determine artifact name
@@ -170,6 +174,7 @@ runs:
170174
echo "Support Level: ${{ env.support }}"
171175
echo "Source Ref: ${{ env.src != '' && env.src || '(latest)' }}"
172176
echo "Metadata: ${{ env.metadata != '' && env.metadata || '(none)' }}"
177+
echo "Release: ${{ env.release == 'true' && 'yes' || 'no' }}"
173178
echo "Artifact Name: ${{ env.artifact_name }}"
174179
echo "======================================"
175180
shell: bash
@@ -314,7 +319,7 @@ runs:
314319
fi
315320
${{ env.metadata != '' && format('echo "{0}" > version/metadata', env.metadata) || '' }}
316321
export PATH="/usr/local/nim/bin/:$PATH"
317-
./build.nims --install --mode ${{ env.build_mode }} --log
322+
./build.nims --install --mode ${{ env.build_mode }} --log${{ env.release == 'true' && ' --release' || '' }}
318323
cd ..
319324
cp -r $HOME/.arturo/bin/* /usr/local/bin/
320325
rm -rf arturo-src
@@ -440,7 +445,7 @@ runs:
440445
if: inputs.do == 'compile' && (env.os == 'linux' || env.os == 'macos' || env.os == 'web')
441446
run: |
442447
cd arturo-src
443-
./build.nims --install --mode ${{ env.build_mode }} --arch ${{ env.arch }} --log
448+
./build.nims --install --mode ${{ env.build_mode }} --arch ${{ env.arch }} --log${{ env.release == 'true' && ' --release' || '' }}
444449
445450
echo "$HOME/.arturo/bin" >> $GITHUB_PATH
446451
echo "arturoDistPath=$HOME/.arturo/bin" >> $GITHUB_ENV
@@ -455,7 +460,7 @@ runs:
455460
export PATH="${{ github.workspace }}/nim/nim-2.2.8/bin":$PATH
456461
457462
cd arturo-src
458-
./build.nims --install --mode ${{ env.mode }} --log
463+
./build.nims --install --mode ${{ env.mode }} --log${{ env.release == 'true' && ' --release' || '' }}
459464
cd ..
460465
461466
mkdir bin

0 commit comments

Comments
 (0)