Skip to content

Commit 06a6843

Browse files
committed
use env file in github action
Signed-off-by: hexilee <i@hexilee.me>
1 parent 892ce23 commit 06a6843

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ jobs:
5252
sudo apt-get install -y libsqlite3-dev
5353
- name: get version
5454
working-directory: ${{ matrix.package.path }}
55-
run: echo ::set-env name=PACKAGE_VERSION::$(sed -nE 's/^\s*version = "(.*?)"/\1/p' Cargo.toml)
55+
run: echo "PACKAGE_VERSION=$(sed -nE 's/^\s*version = \"(.*?)\"/\1/p' Cargo.toml)" >> $GITHUB_ENV
5656
- name: check published version
57-
run: echo ::set-env name=PUBLISHED_VERSION::$(cargo search ${{ matrix.package.registryName }} --limit 1 | sed -nE 's/^[^"]*"//; s/".*//1p' -)
57+
run: echo "PUBLISHED_VERSION=$(cargo search ${{ matrix.package.registryName }} --limit 1 | sed -nE 's/^[^\"]*\"//; s/\".*//1p' -)" >> $GITHUB_ENV
5858
- name: cargo login
5959
if: env.PACKAGE_VERSION != env.PUBLISHED_VERSION
6060
run: cargo login ${{ secrets.CRATE_TOKEN }}

0 commit comments

Comments
 (0)