Check cargo-publish error type
This commit is contained in:
parent
8f28048f61
commit
524bbb9ef5
|
@ -28,19 +28,39 @@ jobs:
|
|||
|
||||
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
|
||||
|
||||
env:
|
||||
CRATESIO_TOKEN: ${{ secrets.CRATESIO_TOKEN }}
|
||||
ALSA: alsa-sys.txt
|
||||
CPAL: cpal.txt
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Install alsa
|
||||
run: sudo apt-get install libasound2-dev
|
||||
- name: Run cargo publish
|
||||
- name: Run cargo publish for alsa-sys
|
||||
continue-on-error: true
|
||||
env:
|
||||
MANIFEST: alsa-sys/Cargo.toml
|
||||
CRATESIO_TOKEN: ${{ secrets.CRATESIO_TOKEN }}
|
||||
run: |
|
||||
cargo publish --token $CRATESIO_TOKEN --manifest-path $MANIFEST
|
||||
cargo publish --token $CRATESIO_TOKEN
|
||||
cargo publish --token $CRATESIO_TOKEN --manifest-path $MANIFEST 2> $ALSA
|
||||
- name: Check if alsa-sys is already published
|
||||
run: |
|
||||
empty=0
|
||||
grep -q '[^[:space:]]' < $ALSA || empty=1
|
||||
[ $empty -eq 0 ] && cat $ALSA
|
||||
[ $empty -eq 1 ] || grep -q "is already uploaded" < $ALSA
|
||||
- name: Run cargo publish for cpal
|
||||
continue-on-error: true
|
||||
run: |
|
||||
cargo publish --token $CRATESIO_TOKEN 2> $CPAL
|
||||
- name: Check if cpal is already published
|
||||
run: |
|
||||
empty=0
|
||||
grep -q '[^[:space:]]' < $CPAL || empty=1
|
||||
[ $empty -eq 0 ] && cat $CPAL
|
||||
[ $empty -eq 1 ] || grep -q "is already uploaded" < $CPAL
|
||||
|
||||
ubuntu-test:
|
||||
|
||||
|
|
Loading…
Reference in New Issue