From b1be0df2b53203e9ecab0c728798765e8f8f0c9a Mon Sep 17 00:00:00 2001 From: p4ken Date: Sun, 26 May 2024 10:28:07 +0900 Subject: [PATCH] Add custom workflow --- .github/workflows/rust.yml | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 9f87a20..8168339 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -4,16 +4,33 @@ on: push: schedule: - cron: '0 3 * * *' + workflow_dispatch: + inputs: + bump: + required: false + # default: '' + type: choice + options: + - patch + - minor env: CARGO_TERM_COLOR: always jobs: build: - runs-on: ubuntu-latest - steps: - uses: actions/checkout@v4 - name: Build run: make + + publish: + if: "${{ github.event.inputs.bump != '' }}" + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Publish + env: + CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} + run: echo $CARGO_REGISTRY_TOKEN