From b0644be6c60ba5f6c42f5658530e96d0b2f49d14 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Sat, 19 Nov 2022 22:10:00 -0500 Subject: [PATCH] chore: add release workflow --- .github/workflows/release.yml | 37 +++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..fb906ea --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,37 @@ +name: release + +on: + workflow_dispatch: + inputs: + releaseKind: + description: 'Kind of release' + default: 'minor' + type: choice + options: + - patch + - minor + required: true + +jobs: + rust: + name: release + runs-on: ubuntu-latest + timeout-minutes: 30 + + steps: + - name: Clone repository + uses: actions/checkout@v3 + with: + token: ${{ secrets.GH_DPRINTBOT_PAT }} + + - uses: denoland/setup-deno@v1 + - uses: dtolnay/rust-toolchain@stable + + - name: Bump version and tag + env: + GITHUB_TOKEN: ${{ secrets.GH_DPRINTBOT_PAT }} + GH_WORKFLOW_ACTOR: ${{ github.actor }} + run: | + git config user.email "${{ github.actor }}@users.noreply.github.com" + git config user.name "${{ github.actor }}" + deno run -A https://raw.githubusercontent.com/dprint/automation/0.5.1/tasks/publish_release.ts --${{github.event.inputs.releaseKind}}