Skip to content

Commit d2dd16c

Browse files
authored
ci: setup trusted publishing (#1124)
https://crates.io/docs/trusted-publishing
1 parent e1061fe commit d2dd16c

File tree

9 files changed

+26
-22
lines changed

9 files changed

+26
-22
lines changed

.github/workflows/release.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,11 @@ jobs:
99
name: Publish crates on release
1010
runs-on: ubuntu-latest
1111
environment: release
12+
permissions:
13+
id-token: write # Required for OIDC token exchange
1214
steps:
1315
- name: Checkout repository
14-
uses: actions/checkout@v3
16+
uses: actions/checkout@v5
1517
- name: Install jq
1618
run: sudo apt-get update && sudo apt-get install -y jq
1719
- name: Install toolchain
@@ -20,7 +22,9 @@ jobs:
2022
run: cargo build --package pest_bootstrap
2123
- name: Bootstraping Grammars - Executing
2224
run: cargo run --package pest_bootstrap
25+
- uses: rust-lang/crates-io-auth-action@v1
26+
id: auth
2327
- name: Publish pest crates
2428
run: ./release.sh
2529
env:
26-
CARGO_REGISTRY_TOKEN: ${{secrets.CARGO_REGISTRY_TOKEN}}
30+
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}

debugger/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "pest_debugger"
33
description = "pest grammar debugger"
4-
version = "2.8.2"
4+
version = "2.8.3"
55
edition = "2021"
66
authors = [
77
"Dragoș Tiselice <[email protected]>",
@@ -17,9 +17,9 @@ readme = "_README.md"
1717
rust-version = "1.81"
1818

1919
[dependencies]
20-
pest = { path = "../pest", version = "2.8.2" }
21-
pest_meta = { path = "../meta", version = "2.8.2" }
22-
pest_vm = { path = "../vm", version = "2.8.2" }
20+
pest = { path = "../pest", version = "2.8.3" }
21+
pest_meta = { path = "../meta", version = "2.8.3" }
22+
pest_vm = { path = "../vm", version = "2.8.3" }
2323
reqwest = { version = "= 0.11.13", default-features = false, features = [
2424
"blocking",
2525
"json",

derive/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "pest_derive"
33
description = "pest's derive macro"
4-
version = "2.8.2"
4+
version = "2.8.3"
55
edition = "2021"
66
authors = ["Dragoș Tiselice <[email protected]>"]
77
homepage = "https://pest.rs/"
@@ -25,5 +25,5 @@ grammar-extras = ["pest_generator/grammar-extras"]
2525

2626
[dependencies]
2727
# for tests, included transitively anyway
28-
pest = { path = "../pest", version = "2.8.2", default-features = false }
29-
pest_generator = { path = "../generator", version = "2.8.2", default-features = false }
28+
pest = { path = "../pest", version = "2.8.3", default-features = false }
29+
pest_generator = { path = "../generator", version = "2.8.3", default-features = false }

generator/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "pest_generator"
33
description = "pest code generator"
4-
version = "2.8.2"
4+
version = "2.8.3"
55
edition = "2021"
66
authors = ["Dragoș Tiselice <[email protected]>"]
77
homepage = "https://pest.rs/"
@@ -22,8 +22,8 @@ grammar-extras = ["pest_meta/grammar-extras"]
2222
export-internal = []
2323

2424
[dependencies]
25-
pest = { path = "../pest", version = "2.8.2", default-features = false }
26-
pest_meta = { path = "../meta", version = "2.8.2" }
25+
pest = { path = "../pest", version = "2.8.3", default-features = false }
26+
pest_meta = { path = "../meta", version = "2.8.3" }
2727
proc-macro2 = "1.0"
2828
quote = "1.0"
2929
syn = "2.0"

grammars/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "pest_grammars"
33
description = "pest popular grammar implementations"
4-
version = "2.8.2"
4+
version = "2.8.3"
55
edition = "2021"
66
authors = ["Dragoș Tiselice <[email protected]>"]
77
homepage = "https://pest.rs/"
@@ -14,8 +14,8 @@ readme = "_README.md"
1414
rust-version = "1.81"
1515

1616
[dependencies]
17-
pest = { path = "../pest", version = "2.8.2" }
18-
pest_derive = { path = "../derive", version = "2.8.2" }
17+
pest = { path = "../pest", version = "2.8.3" }
18+
pest_derive = { path = "../derive", version = "2.8.3" }
1919

2020
[dev-dependencies]
2121
criterion = "0.5"

meta/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "pest_meta"
33
description = "pest meta language parser and validator"
4-
version = "2.8.2"
4+
version = "2.8.3"
55
edition = "2021"
66
authors = ["Dragoș Tiselice <[email protected]>"]
77
homepage = "https://pest.rs/"
@@ -22,7 +22,7 @@ include = [
2222
rust-version = "1.81"
2323

2424
[dependencies]
25-
pest = { path = "../pest", version = "2.8.2" }
25+
pest = { path = "../pest", version = "2.8.3" }
2626

2727
[build-dependencies]
2828
sha2 = { version = "0.10", default-features = false }

pest/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "pest"
33
description = "The Elegant Parser"
4-
version = "2.8.2"
4+
version = "2.8.3"
55
edition = "2021"
66
authors = ["Dragoș Tiselice <[email protected]>"]
77
homepage = "https://pest.rs/"

release.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ get_local_version() {
99
}
1010

1111
check_version_online() {
12-
curl -s "https://crates.io/api/v1/crates/${1}" | jq -r '.versions[]|select(.num == "'"${2}"'").updated_at'
12+
curl -A "pest" -s "https://crates.io/api/v1/crates/${1}" | jq -r '.versions[]|select(.num == "'"${2}"'").updated_at'
1313
}
1414

1515
get_manifest_path() {

vm/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "pest_vm"
33
description = "pest grammar virtual machine"
4-
version = "2.8.2"
4+
version = "2.8.3"
55
edition = "2021"
66
authors = ["Dragoș Tiselice <[email protected]>"]
77
homepage = "https://pest.rs/"
@@ -14,8 +14,8 @@ readme = "_README.md"
1414
rust-version = "1.81"
1515

1616
[dependencies]
17-
pest = { path = "../pest", version = "2.8.2" }
18-
pest_meta = { path = "../meta", version = "2.8.2" }
17+
pest = { path = "../pest", version = "2.8.3" }
18+
pest_meta = { path = "../meta", version = "2.8.3" }
1919

2020
[features]
2121
grammar-extras = ["pest_meta/grammar-extras"]

0 commit comments

Comments
 (0)