Skip to content

Commit cabef3c

Browse files
authored
Merge pull request #12 from engali94/ci/miri
Iterate over release pipline
2 parents 223a714 + 9d4fcf2 commit cabef3c

1 file changed

Lines changed: 16 additions & 9 deletions

File tree

.github/workflows/release.yml

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,10 @@ jobs:
3737
- name: Install Rust (stable)
3838
uses: dtolnay/rust-toolchain@stable
3939
with:
40-
components: cargo
40+
components: cargo,clippy
41+
42+
- name: Install cargo-edit
43+
run: cargo install cargo-edit --locked
4144

4245
- name: Verify working tree is clean
4346
run: |
@@ -47,14 +50,8 @@ jobs:
4750
exit 1
4851
fi
4952
50-
- name: Validate version input
51-
run: |
52-
expected="${{ inputs.version }}"
53-
actual=$(cargo metadata --no-deps --format-version 1 | jq -r '.packages[0].version')
54-
if [ "$expected" != "$actual" ]; then
55-
echo "Input version $expected does not match Cargo.toml version $actual" >&2
56-
exit 1
57-
fi
53+
- name: Update crate version
54+
run: cargo set-version ${{ inputs.version }}
5855

5956
- name: Tests
6057
run: |
@@ -72,6 +69,16 @@ jobs:
7269
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
7370
run: cargo publish
7471

72+
- name: Commit version bump
73+
if: ${{ !inputs.dry_run }}
74+
run: |
75+
git add Cargo.toml Cargo.lock
76+
git commit -m "Release ${{ inputs.version }}"
77+
78+
- name: Push changes
79+
if: ${{ !inputs.dry_run }}
80+
run: git push origin HEAD:main
81+
7582
- name: Create tag
7683
if: ${{ !inputs.dry_run }}
7784
run: |

0 commit comments

Comments
 (0)