From 9ab65e902e233754a52f3bd92089cd8b358db78f Mon Sep 17 00:00:00 2001 From: Matthias Diester Date: Wed, 17 Aug 2022 14:22:07 +0200 Subject: [PATCH] Add `workflow_dispatch` release action Change release action to use `workflow_dispatch`. --- .../{release.yml => release-build.yml} | 4 +-- .github/workflows/release-create.yml | 33 +++++++++++++++++++ 2 files changed, 35 insertions(+), 2 deletions(-) rename .github/workflows/{release.yml => release-build.yml} (92%) create mode 100644 .github/workflows/release-create.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release-build.yml similarity index 92% rename from .github/workflows/release.yml rename to .github/workflows/release-build.yml index 84821da..35aabfe 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release-build.yml @@ -1,5 +1,5 @@ --- -name: Release +name: Build Release on: push: tags: @@ -7,7 +7,7 @@ on: jobs: goreleaser: - name: Release + name: Build Release runs-on: ubuntu-latest steps: - name: Checkout diff --git a/.github/workflows/release-create.yml b/.github/workflows/release-create.yml new file mode 100644 index 0000000..fd4667d --- /dev/null +++ b/.github/workflows/release-create.yml @@ -0,0 +1,33 @@ +--- +name: Create Release +on: + workflow_dispatch: + inputs: + version: + description: 'Release version' + required: true + type: string + +jobs: + release: + name: Create Release + runs-on: ubuntu-latest + permissions: + contents: write + + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - uses: actions/setup-go@v3 + with: + go-version: 1.18.x + + - name: Create release + uses: actions/create-release@v1 + with: + release_name: "retry release ${{ github.event.inputs.version }}" + tag_name: ${{ github.event.inputs.version }} + env: + GITHUB_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }}