Skip to content

Commit

Permalink
Merge branch 'release-workflow-and-deb-package' into release/v0.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
auyer committed May 19, 2024
2 parents 965a20f + d4edd64 commit 037e8d2
Showing 1 changed file with 23 additions and 2 deletions.
25 changes: 23 additions & 2 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,17 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# This can help you publish to crates.io
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
run: cargo publish --dry-run -p libprotonup
run: |
# retrieve available versions in crates.io api to skip upload if it was published already
published_versions=$( curl 'https://crates.io/api/v1/crates/libprotonup' -H 'Accept: */*' | jq '.versions[].num' )
exists=false
if [[ ${published_versions[@]} =~ $(echo $CURRENT_VERSION | sed 's/v//' ) ]]
then
exists=true
fi
if ! ( $exists ) ; then
cargo publish -p libprotonup
fi
- name: Run cargo build
run: cargo build --release
Expand Down Expand Up @@ -108,5 +118,16 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# This can help you publish to crates.io
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
run: cargo publish --dry-run -p protonup-rs
run: |
# retrieve available versions in crates.io api to skip upload if it was published already
published_versions=$( curl 'https://crates.io/api/v1/crates/Protonup-rs' -H 'Accept: */*' | jq '.versions[].num' )
exists=false
if [[ ${published_versions[@]} =~ $(echo $CURRENT_VERSION | sed 's/v//' ) ]]
then
exists=true
fi
if ! ( $exists ) ; then
cargo publish -p protonup-rs
fi

0 comments on commit 037e8d2

Please sign in to comment.