From d9a32c72eb1892a44393a0a22ac98f6daf7ecf6a Mon Sep 17 00:00:00 2001 From: rvcas Date: Tue, 18 Feb 2025 18:10:16 -0500 Subject: [PATCH] feat: new github action for tagging releases --- .github/workflows/tag.yml | 41 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/tag.yml diff --git a/.github/workflows/tag.yml b/.github/workflows/tag.yml new file mode 100644 index 00000000..448caacb --- /dev/null +++ b/.github/workflows/tag.yml @@ -0,0 +1,41 @@ +name: Create Release Tag + +on: + workflow_dispatch: + inputs: + bump: + description: 'Version bump type (major, minor, patch)' + required: true + default: 'patch' + type: choice + options: + - major + - minor + - patch + +jobs: + publish: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + token: ${{ secrets.GITHUB_TOKEN }} + + - name: Set up Rust + uses: Swatinem/rust-cache@v2 + + - name: Install cargo-release + run: cargo install cargo-release + + - name: Configure Git + run: | + git config --global user.name "GitHub Action" + git config --global user.email "action@github.com" + + - name: Run cargo release + env: + CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_TOKEN }} + run: | + cargo release ${{ github.event.inputs.bump }} --execute