Update release.yml
This commit is contained in:
parent
90187b542b
commit
1c29873b14
4
.github/workflows/release.yml
vendored
4
.github/workflows/release.yml
vendored
|
@ -48,9 +48,9 @@ jobs:
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
- name: get version
|
- name: get version
|
||||||
working-directory: ${{ matrix.package.path }}
|
working-directory: ${{ matrix.package.path }}
|
||||||
run: echo name=PACKAGE_VERSION::$(sed -nE 's/^\s*version = "(.*?)"/\1/p' Cargo.toml) >> $GITHUB_ENV
|
run: echo PACKAGE_VERSION=$(sed -nE 's/^\s*version = "(.*?)"/\1/p' Cargo.toml) >> $GITHUB_ENV
|
||||||
- name: check published version
|
- name: check published version
|
||||||
run: echo name=PUBLISHED_VERSION::$(cargo search ${{ matrix.package.registryName }} --limit 1 | sed -nE 's/^[^"]*"//; s/".*//1p' -) >> $GITHUB_ENV
|
run: echo PUBLISHED_VERSION=$(cargo search ${{ matrix.package.registryName }} --limit 1 | sed -nE 's/^[^"]*"//; s/".*//1p' -) >> $GITHUB_ENV
|
||||||
- name: cargo login
|
- name: cargo login
|
||||||
if: env.PACKAGE_VERSION != env.PUBLISHED_VERSION
|
if: env.PACKAGE_VERSION != env.PUBLISHED_VERSION
|
||||||
run: cargo login ${{ secrets.CRATES_TOKEN }}
|
run: cargo login ${{ secrets.CRATES_TOKEN }}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user