File tree Expand file tree Collapse file tree 5 files changed +151
-0
lines changed Expand file tree Collapse file tree 5 files changed +151
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Publish to crate.io
2
+
3
+ on :
4
+ workflow_dispatch :
5
+
6
+ env :
7
+ CARGO_TERM_COLOR : always
8
+
9
+ jobs :
10
+ run-test-workflow :
11
+ uses : ./.github/workflows/on-pull-request.yml
12
+
13
+ publish :
14
+ name : Publish to crate.io
15
+ needs : run-test-workflow
16
+ runs-on : ubuntu-latest
17
+ steps :
18
+ - uses : actions/checkout@v4
19
+ - uses : dtolnay/rust-toolchain@stable
20
+
21
+ - uses : katyo/publish-crates@v2
22
+ with :
23
+ registry-token : ${{ secrets.CARGO_REGISTRY_TOKEN }}
24
+
25
+ tag-and-release :
26
+ name : Tag and Release
27
+ needs : publish
28
+ runs-on : ubuntu-latest
29
+ steps :
30
+ - uses : actions/checkout@v4
31
+ with :
32
+ fetch-depth : 0
33
+
34
+ - name : Get version
35
+ id : get_version
36
+ run : echo "version=$(cat Cargo.toml | grep version | head -n1 | cut -d '"' -f2)" >> "$GITHUB_OUTPUT"
37
+
38
+ - uses : rickstaa/action-create-tag@v1
39
+ id : tag_create
40
+ with :
41
+ tag : v${{ steps.get_version.outputs.version }}
42
+
43
+ - name : Create Release
44
+ if : !steps.tag_create.outputs.tag_exists
45
+ uses : actions/create-release@v1
46
+ env :
47
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
48
+ with :
49
+ tag_name : v${{ steps.get_version.outputs.version }}
50
+ release_name : v${{ steps.get_version.outputs.version }}
Original file line number Diff line number Diff line change
1
+ name : Run build and tests
2
+ on :
3
+ workflow_call :
4
+ workflow_dispatch :
5
+ pull_request :
6
+
7
+ env :
8
+ CARGO_TERM_COLOR : always
9
+
10
+ jobs :
11
+ lint-format :
12
+ name : Lint and Format
13
+ runs-on : ubuntu-latest
14
+ steps :
15
+ - uses : actions/checkout@v4
16
+ - uses : dtolnay/rust-toolchain@stable
17
+
18
+ - name : Install clippy
19
+ run : rustup component add clippy
20
+ - name : Check linting
21
+ cargo clippy --all-targets --all-features -- -D warnings
22
+
23
+ - name : Install rustfmt
24
+ run : rustup component add rustfmt
25
+ - name : Check formatting
26
+ run : cargo fmt --all -- --check
27
+
28
+ build-and-test :
29
+ name : Build and Test
30
+ runs-on : ubuntu-latest
31
+ steps :
32
+ - uses : actions/checkout@v4
33
+ - uses : dtolnay/rust-toolchain@stable
34
+
35
+ - name : Build
36
+ run : cargo build --release --verbose
37
+ - name : Test
38
+ run : cargo test --release --no-fail-fast --verbose
39
+
40
+ publish-check :
41
+ name : Publish Check
42
+ needs :
43
+ - lint-format
44
+ - build-and-test
45
+ runs-on : ubuntu-latest
46
+ steps :
47
+ - uses : actions/checkout@v4
48
+ - uses : dtolnay/rust-toolchain@stable
49
+ - uses : katyo/publish-crates@v2
50
+ with :
51
+ dry-run : true
Original file line number Diff line number Diff line change
1
+ name : Undo a Yank of a published version from crate.io
2
+
3
+ on :
4
+ workflow_dispatch :
5
+ inputs :
6
+ version :
7
+ description : The version number you wish to un-yank from crate.io
8
+ required : true
9
+ type : string
10
+
11
+ env :
12
+ CARGO_TERM_COLOR : always
13
+
14
+ jobs :
15
+ yank :
16
+ name : Undo a Yank of a published version from crate.io
17
+ runs-on : ubuntu-latest
18
+ steps :
19
+ - uses : dtolnay/rust-toolchain@stable
20
+ - name : Yank
21
+ if : github.event.inputs.version != ''
22
+ run : cargo yank --version ${{ github.event.inputs.version }} --token ${{ secrets.CARGO_REGISTRY_TOKEN }}
Original file line number Diff line number Diff line change
1
+ name : Yank a published version from crate.io
2
+
3
+ on :
4
+ workflow_dispatch :
5
+ inputs :
6
+ version :
7
+ description : The version number you wish to yank from crate.io
8
+ required : true
9
+ type : string
10
+
11
+ env :
12
+ CARGO_TERM_COLOR : always
13
+
14
+ jobs :
15
+ yank :
16
+ name : Yank a published version from crate.io
17
+ runs-on : ubuntu-latest
18
+ steps :
19
+ - uses : dtolnay/rust-toolchain@stable
20
+ - name : Yank
21
+ if : github.event.inputs.version != ''
22
+ run : cargo yank ${{ github.event.inputs.version }} --token ${{ secrets.CARGO_REGISTRY_TOKEN }}
Original file line number Diff line number Diff line change 2
2
name = " passage_flex"
3
3
version = " 0.1.0"
4
4
edition = " 2021"
5
+ authors = [" support@passage.id" ]
6
+ description = " Provides verification of server-side authentication for applications using Passage Passkey Flex"
7
+ homepage = " https://github.com/passageidentity/passage-flex-rust"
8
+ repository = " https://github.com/passageidentity/passage-flex-rust"
9
+ readme = " README.md"
10
+ license = " MIT"
5
11
6
12
[dependencies ]
7
13
http = " ^1.1.0"
You can’t perform that action at this time.
0 commit comments