Skip to content

Commit

Permalink
ci: fix deprecated set-env
Browse files Browse the repository at this point in the history
  • Loading branch information
slai11 committed May 4, 2024
1 parent e96289f commit a545688
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
if: env.RELEASE_VERSION == ''
run: |
RELEASE_VERSION=${GITHUB_REF#refs/tags/}
echo "::set-env name=RELEASE_VERSION::${RELEASE_VERSION}"
echo "RELEASE_VERSION=${RELEASE_VERSION}" >> $GITHUB_ENV
echo "version is: ${RELEASE_VERSION}"
- name: Save version number to artifact
Expand Down Expand Up @@ -61,7 +61,7 @@ jobs:
env:
CARGO: cargo
# When CARGO is set to CROSS, this is set to `--target matrix.target`.
TARGET_FLAGS:
TARGET_FLAGS: ''
# When CARGO is set to CROSS, TARGET_DIR includes matrix.target.
TARGET_DIR: ./target
# Emit backtraces on panics.
Expand Down Expand Up @@ -125,9 +125,9 @@ jobs:
# FIXME: to work around bugs in latest cross release, install master.
# See: https://github.com/rust-embedded/cross/issues/357
cargo install --git https://github.com/rust-embedded/cross cross
echo "::set-env name=CARGO::cross"
echo "::set-env name=TARGET_FLAGS::--target ${{ matrix.target }}"
echo "::set-env name=TARGET_DIR::./target/${{ matrix.target }}"
echo "CARGO=cross" >> $GITHUB_ENV
echo "TARGET_FLAGS=--target ${{ matrix.target }}" >> $GITHUB_ENV
echo "TARGET_DIR=./target/${{ matrix.target }}" >> $GITHUB_ENV
- name: Show command used for Cargo
run: |
Expand All @@ -145,10 +145,9 @@ jobs:
shell: bash
run: |
release_upload_url="$(cat artifacts/release-upload-url)"
echo "::set-env name=RELEASE_UPLOAD_URL::$release_upload_url"
echo "release upload url: $RELEASE_UPLOAD_URL"
echo "RELEASE_UPLOAD_URL=$release_upload_url" >> $GITHUB_ENV
RELEASE_VERSION="$(cat artifacts/release-version)"
echo "::set-env name=RELEASE_VERSION::${RELEASE_VERSION}"
echo "RELEASE_VERSION=${RELEASE_VERSION}" >> $GITHUB_ENV
echo "release version: ${RELEASE_VERSION}"
- name: Build release binary
Expand Down Expand Up @@ -179,12 +178,12 @@ jobs:
if [ "${{ matrix.os }}" = "windows-2019" ]; then
cp "target/${{ matrix.target }}/release/goto-rs.exe" "$staging/"
7z a "$staging.zip" "$staging"
echo "::set-env name=ASSET::$staging.zip"
echo "ASSET=$staging.zip" >> $GITHUB_ENV
else
# The man page is only generated on Unix systems.
cp "target/${{ matrix.target }}/release/goto-rs" "$staging/"
tar czf "$staging.tar.gz" "$staging"
echo "::set-env name=ASSET::$staging.tar.gz"
echo "ASSET=$staging.tar.gz" >> $GITHUB_ENV
fi
- name: Upload release archive
Expand Down Expand Up @@ -220,7 +219,7 @@ jobs:
shell: bash
run: |
RELEASE_VERSION="$(cat artifacts/release-version)"
echo "::set-env name=RELEASE_VERSION::${RELEASE_VERSION}"
echo "RELEASE_VERSION::${RELEASE_VERSION}" >> $GITHUB_ENV
echo "release version: ${RELEASE_VERSION}"
rm -rf artifacts/
- name: Publish to crates.io
Expand Down

0 comments on commit a545688

Please sign in to comment.