From 0f963ca027c0b33c4ddc99174a22c57f5b30c94e Mon Sep 17 00:00:00 2001 From: p4ken Date: Sun, 26 May 2024 11:16:32 +0900 Subject: [PATCH] '' --- .github/workflows/rust.yml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index a2a94d8..44ea425 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -9,7 +9,7 @@ on: bump: type: choice options: - - false + - "" - patch - minor @@ -30,11 +30,16 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Publish - env: - CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} + - name: Install cargo set-version + run: cargo install cargo-edit + - name: Bump run: | - cargo install cargo-edit + git config user.name "GitHub Actions" + git config user.email "<>" cargo set-version --bump ${{ inputs.bump }} git commit --all -m "v${{ inputs.bump }}" git tag "v${{ inputs.bump }}" + - name: Publish + env: + CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} + run: cargo publish --dry-run