From 839f026b8113ad8a1558b88eb4463d5113a3b770 Mon Sep 17 00:00:00 2001 From: Amith Mohanan Date: Mon, 30 Jan 2023 12:26:08 +0530 Subject: [PATCH] chore(ci): + workflow to create GH release on v* tags --- .github/workflows/release.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 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 000000000..f62e41c3d --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,28 @@ +name: Release + +on: + push: + tags: + - "v*" + +jobs: + release: + name: Release + runs-on: ubuntu-latest + steps: + - id: major_version + run: > + echo major_version=$( + echo ${{ github.ref }} | cut -d'v' -f2 | cut -d'.' -f1 + ) >> $GITHUB_OUTPUT + - id: is_release_candidate + run: > + echo is_release_candidate=$( + echo ${{ github.ref }} | grep -c 'rc' + ) >> $GITHUB_OUTPUT + - name: Create release + uses: softprops/action-gh-release@v1 + with: + prerelease: ${{ steps.major_version.outputs.major_version == 0 || steps.is_release_candidate.outputs.is_release_candidate == 1 }} + generate_release_notes: true + files: nb