3838 if : runner.os == 'Linux'
3939 run : sudo apt-get update && sudo apt-get install -y uuid-dev
4040
41+ - name : Cache cargo-release binary
42+ uses : actions/cache@v4
43+ with :
44+ path : ~/.cargo/bin/cargo-release
45+ key : cargo-release-${{ runner.os }}
46+
47+ - name : Cache Gradle dependencies
48+ uses : actions/cache@v4
49+ with :
50+ path : |
51+ ~/.gradle/caches
52+ ~/.gradle/wrapper
53+ key : ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle/wrapper/gradle-wrapper.properties') }}
54+ restore-keys : |
55+ ${{ runner.os }}-gradle-
56+
57+ - name : Test with artifacts
58+ run : |
59+ cargo test --features precompile,static --workspace -- --nocapture
60+ git reset --hard HEAD
61+ git clean -fdx -e artifacts
62+
63+ - name : Install cargo-release
64+ run : cargo install cargo-release || true
65+
66+ - name : Run cargo-release for specified version
67+ env :
68+ CARGO_REGISTRY_TOKEN : ${{ secrets.CARGO_REGISTRY_TOKEN }}
69+ CARGO_HTTP_MULTIPLEXING : false
70+ run : |
71+ git config --global user.email "[email protected] " 72+ git config --global user.name "Mo Imran"
73+ release_type="${{ github.event.inputs.release_type }}"
74+ cargo release "$release_type" --workspace --execute --no-confirm --verbose --no-verify
75+
76+ - name : Push new version and tag to GitHub
77+ 78+ with :
79+ github_token : ${{ secrets.GITHUB_TOKEN }}
80+ branch : main
81+ tags : true
82+
4183 - name : Determine latest CI run ID
4284 id : find_ci
4385 uses : actions/github-script@v6
76118 --dir "artifacts/$art"
77119 done
78120 find artifacts
79-
121+
80122
81123 - name : Package artifacts
82124 shell : bash
@@ -90,48 +132,6 @@ jobs:
90132 tar -czf "$archive" -C artifacts "$(basename "$artifact_dir")"
91133 done
92134
93- - name : Cache cargo-release binary
94- uses : actions/cache@v4
95- with :
96- path : ~/.cargo/bin/cargo-release
97- key : cargo-release-${{ runner.os }}
98-
99- - name : Cache Gradle dependencies
100- uses : actions/cache@v4
101- with :
102- path : |
103- ~/.gradle/caches
104- ~/.gradle/wrapper
105- key : ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle/wrapper/gradle-wrapper.properties') }}
106- restore-keys : |
107- ${{ runner.os }}-gradle-
108-
109- - name : Test with artifacts
110- run : |
111- cargo test --features precompile,static --workspace -- --nocapture
112- git reset --hard HEAD
113- git clean -fdx -e artifacts
114-
115- - name : Install cargo-release
116- run : cargo install cargo-release || true
117-
118- - name : Run cargo-release for specified version
119- env :
120- CARGO_REGISTRY_TOKEN : ${{ secrets.CARGO_REGISTRY_TOKEN }}
121- CARGO_HTTP_MULTIPLEXING : false
122- run : |
123- git config --global user.email "[email protected] " 124- git config --global user.name "Mo Imran"
125- release_type="${{ github.event.inputs.release_type }}"
126- cargo release "$release_type" --workspace --execute --no-confirm --verbose --no-verify
127-
128- - name : Push new version and tag to GitHub
129- 130- with :
131- github_token : ${{ secrets.GITHUB_TOKEN }}
132- branch : main
133- tags : true
134-
135135 - name : Extract version
136136 id : extract_version
137137 run : |
0 commit comments