File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed
Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -45,12 +45,16 @@ jobs:
4545 env :
4646 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
4747 CARGO_REGISTRY_TOKEN : ${{ secrets.CARGO_REGISTRY_TOKEN }}
48+ shell : bash
4849 run : |
50+ set -o pipefail
4951 # retrieve available versions in crates.io api to skip upload if it was published already
50- published_versions=$( curl 'https://crates.io/api/v1/crates/libprotonup' -H 'Accept: */*' | jq -r '.versions[].num' )
52+ published_versions=$( curl -s --fail -A "github.com/auyer/Protonup-rs curl release workflow" 'https://crates.io/api/v1/crates/libprotonup' -H 'Accept: */*' | jq '.versions[].num' )
5153 exists=false
54+ echo "known versions:"
55+ echo $published_versions
5256 for version in $published_versions; do
53- if [[ "$version" == "$CURRENT_VERSION" ]]; then
57+ if [[ "$version" =~ "$CURRENT_VERSION" ]]; then
5458 exists=true
5559 break
5660 fi
@@ -105,12 +109,16 @@ jobs:
105109 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
106110 # This can help you publish to crates.io
107111 CARGO_REGISTRY_TOKEN : ${{ secrets.CARGO_REGISTRY_TOKEN }}
112+ shell : bash
108113 run : |
114+ set -o pipefail
109115 # retrieve available versions in crates.io api to skip upload if it was published already
110- published_versions=$( curl 'https://crates.io/api/v1/crates/Protonup-rs' -H 'Accept: */*' | jq -r '.versions[].num' )
116+ published_versions=$( curl -s --fail -A "github.com/auyer/Protonup-rs curl release workflow" 'https://crates.io/api/v1/crates/Protonup-rs' -H 'Accept: */*' | jq '.versions[].num' )
111117 exists=false
118+ echo "known versions:"
119+ echo $published_versions
112120 for version in $published_versions; do
113- if [[ "$version" == "$CURRENT_VERSION" ]]; then
121+ if [[ "$version" =~ "$CURRENT_VERSION" ]]; then
114122 exists=true
115123 break
116124 fi
You can’t perform that action at this time.
0 commit comments