Check cargo-publish error type

This commit is contained in:
Luni-4 2019-10-26 17:09:42 +02:00
parent 8f28048f61
commit 524bbb9ef5
1 changed files with 24 additions and 4 deletions

View File

@ -28,19 +28,39 @@ jobs:
if: github.event_name == 'push' && github.ref == 'refs/heads/master' 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 runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v1 - uses: actions/checkout@v1
- name: Install alsa - name: Install alsa
run: sudo apt-get install libasound2-dev run: sudo apt-get install libasound2-dev
- name: Run cargo publish - name: Run cargo publish for alsa-sys
continue-on-error: true
env: env:
MANIFEST: alsa-sys/Cargo.toml MANIFEST: alsa-sys/Cargo.toml
CRATESIO_TOKEN: ${{ secrets.CRATESIO_TOKEN }}
run: | run: |
cargo publish --token $CRATESIO_TOKEN --manifest-path $MANIFEST cargo publish --token $CRATESIO_TOKEN --manifest-path $MANIFEST 2> $ALSA
cargo publish --token $CRATESIO_TOKEN - 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: ubuntu-test: