diff --git a/.github/workflows/check_lint_build.yaml b/.github/workflows/check_lint_build.yaml index e963f07..1fe45c3 100644 --- a/.github/workflows/check_lint_build.yaml +++ b/.github/workflows/check_lint_build.yaml @@ -48,17 +48,26 @@ jobs: command: build args: --release + - name: Set version number environment variable and output filename + run: | + cargo --version + cargo --list + THUNDER_APP_VERSION=cargo metadata | jq -e '.packages | map(select(.name == "thunder_app") | .version) | .[0]' + OUTPUT_FILENAME="thunder-${THUNDER_APP_VERSION}-x86_64-unknown-linux-gnu" + echo "THUNDER_APP_VERSION=$THUNDER_APP_VERSION" >> "$GITHUB_ENV" + echo "OUTPUT_FILENAME=$OUTPUT_FILENAME" >> "$GITHUB_ENV" + - name: 'Set filename for release binary' run: | pushd "target/release" - mv "thunder_app" "thunder-x86_64-unknown-linux-gnu" + ln -s "thunder_app" "${OUTPUT_FILENAME}" popd - name: 'Upload Artifacts (thunder)' uses: actions/upload-artifact@v2 with: - name: thunder-x86_64-unknown-linux-gnu - path: target/release/thunder-x86_64-unknown-linux-gnu + name: ${{ env.OUTPUT_FILENAME }} + path: target/release/${{ env.OUTPUT_FILENAME }} if-no-files-found: error build-macos: