File tree Expand file tree Collapse file tree 2 files changed +70
-0
lines changed Expand file tree Collapse file tree 2 files changed +70
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Publish package to cargo and release to GitHub
2
+
3
+ on :
4
+ workflow_dispatch : null
5
+ workflow_call : null
6
+ push :
7
+ branches :
8
+ - main
9
+ paths :
10
+ - ' _version'
11
+
12
+ jobs :
13
+ publish :
14
+ name : publish to cargo
15
+ runs-on : ubuntu-latest
16
+ timeout-minutes : 6
17
+ steps :
18
+ - name : Setup Rust
19
+ uses : actions/checkout@v4
20
+ - name : Build and deploy wheels
21
+ env :
22
+ CARGO_API_KEY : ${{ secrets.CARGO_T }}
23
+ run : |
24
+ cargo login "$CARGO_API_KEY"
25
+ cargo package
26
+ cargo publish
27
+
28
+ release :
29
+ name : Publish release on GitHub
30
+ runs-on : ubuntu-latest
31
+ permissions :
32
+ contents : write
33
+ steps :
34
+ - uses : actions/checkout@v4 # allows workflow to access repo
35
+ - name : Set date for release title
36
+ run : echo today=$(date +"%B %d, %Y") >> $GITHUB_ENV # format date and append to env
37
+ - name : Set version number to most recent change
38
+ run : echo version=$(cat src/_version | grep -oP '[0-9\.]+') >> $GITHUB_ENV
39
+ - name : Create and publish release
40
+ uses : ncipollo/release-action@v1
41
+ with :
42
+ tag : v${{ env.version }}
43
+ commit : ${{ github.sha }}
44
+ name : v${{ env.version }} ${{ env.today }} Release
45
+ generateReleaseNotes : true
46
+ makeLatest : true
Original file line number Diff line number Diff line change
1
+ name : Rust CI
2
+
3
+ on :
4
+ push : null
5
+ pull_request : null
6
+
7
+
8
+ jobs :
9
+ build :
10
+ runs-on : ubuntu-latest
11
+
12
+ steps :
13
+ - name : Setup Rust
14
+ uses : actions/checkout@v4
15
+ # - name: Install cargo-audit
16
+ # run: cargo install cargo-audit
17
+ # - name: Build
18
+ # run: cargo build --verbose
19
+ # - name: Test
20
+ # run: cargo test --verbose
21
+ - name : Clippy
22
+ run : cargo clippy --verbose -- -D warnings
23
+ # - name: Audit
24
+ # run: cargo audit
You can’t perform that action at this time.
0 commit comments