Skip to content

Commit eaa2552

Browse files
committed
Simplify CI workflow: remove version bump and release jobs
1 parent 6cecfe0 commit eaa2552

1 file changed

Lines changed: 1 addition & 50 deletions

File tree

Lines changed: 1 addition & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,14 @@
1-
name: Bump Version and Test
1+
name: Build and Test
22

33
on:
44
push:
55
branches: [ "main" ]
6-
workflow_dispatch:
7-
inputs:
8-
version:
9-
required: true
10-
type: string
11-
description: 'Version to deploy (e.g., 1.0.0)'
126

137
env:
148
CARGO_TERM_COLOR: always
159

1610
jobs:
17-
update_version:
18-
permissions:
19-
contents: write
20-
runs-on: ubuntu-latest
21-
outputs:
22-
new_tag: ${{ steps.tag_version.outputs.new_tag }}
23-
previous_tag: ${{ steps.tag_version.outputs.previous_tag }}
24-
changelog: ${{ steps.tag_version.outputs.changelog }}
25-
steps:
26-
- name: Validate Input Version
27-
if: github.event_name == 'workflow_dispatch'
28-
run: |
29-
if [[ ! "${{ github.event.inputs.version }}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
30-
echo "Invalid format. Expected X.Y.Z"
31-
exit 1
32-
fi
33-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
34-
- name: Bump version and push tag
35-
id: tag_version
36-
uses: mathieudutour/github-tag-action@a22cf08638b34d5badda920f9daf6e72c477b07b
37-
with:
38-
dry_run: true
39-
github_token: ${{ secrets.GITHUB_TOKEN }}
40-
custom_tag: ${{ github.event.inputs.version }}
41-
- name: Apply Updated Version to Cargo.toml
42-
run: |
43-
sed -i -r 's/^version = "[0-9]+.[0-9]+.[0-9]+"$/version = "${{ steps.tag_version.outputs.new_version }}"/' Cargo.toml
44-
cat -e Cargo.toml
45-
cargo publish --dry-run --allow-dirty
46-
- uses: stefanzweifel/git-auto-commit-action@04702edda442b2e678b25b537cec683a1493fcb9
47-
with:
48-
tag_name: ${{ steps.tag_version.outputs.new_tag }}
49-
commit_message: "sync version in Cargo.toml to ${{ steps.tag_version.outputs.new_version }}"
5011
build-and-test:
51-
needs: update_version
5212
strategy:
5313
matrix:
5414
include:
@@ -67,8 +27,6 @@ jobs:
6727
runs-on: ${{ matrix.os }}
6828
steps:
6929
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
70-
with:
71-
ref: ${{ needs.update_version.outputs.new_tag }}
7230
- name: Setup Rust Toolchain for GitHub CI
7331
uses: actions-rust-lang/setup-rust-toolchain@150fca883cd4034361b621bd4e6a9d34e5143606
7432
with:
@@ -81,10 +39,3 @@ jobs:
8139
override: # optional, default is true
8240
- name: Test
8341
run: cargo test --verbose
84-
release:
85-
needs: [build-and-test, update_version]
86-
permissions:
87-
contents: write
88-
uses: DavidLee18/aws_cli/.github/workflows/release.yml@main
89-
with:
90-
tag: ${{ needs.update_version.outputs.new_tag }}

0 commit comments

Comments
 (0)