File tree 3 files changed +13
-12
lines changed
3 files changed +13
-12
lines changed Original file line number Diff line number Diff line change @@ -19,14 +19,14 @@ jobs:
19
19
20
20
steps :
21
21
- name : " Checkout Repository"
22
- uses : actions/checkout@v1
22
+ uses : actions/checkout@v3
23
23
24
- - name : " Install Python Libraries "
25
- run : python -m pip install --user -r requirements.txt
26
- working-directory : " scripts "
24
+ # TODO: Remove when Python 3.11 is the default on the Gihtub Actions image
25
+ - name : " Install Python 3.11 "
26
+ run : sudo apt-get -y install python3.11
27
27
28
28
- name : " Run release script"
29
- run : " python3 scripts/ci-release.py"
29
+ run : " python3.11 scripts/ci-release.py"
30
30
env :
31
31
CARGO_REGISTRY_TOKEN : ${{ secrets.CARGO_REGISTRY_TOKEN }}
32
32
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change 1
- import toml
2
- import requests
1
+ import json
3
2
import subprocess
3
+ import tomllib
4
+ from urllib .request import urlopen
4
5
5
- cargo_toml = toml .load ("Cargo.toml" )
6
+ with open ("Cargo.toml" , "rb" ) as f :
7
+ cargo_toml = tomllib .load (f )
6
8
crate_version = cargo_toml ["package" ]["version" ]
7
9
print ("Detected crate version " + crate_version )
8
10
9
11
api_url = "https://crates.io/api/v1/crates/x86_64/" + crate_version
10
- released_version = requests . get ( api_url ).json ( )
12
+ version_data = json . loads ( urlopen ( api_url ).read () )
11
13
12
- if "version" in released_version :
13
- version = released_version ["version" ]
14
+ if "version" in version_data :
15
+ version = version_data ["version" ]
14
16
assert (version ["crate" ] == "x86_64" )
15
17
assert (version ["num" ] == crate_version )
16
18
print ("Version " + crate_version + " already exists on crates.io" )
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments