From 535df9db8a811296c5e1c32eed60730cccb5ede7 Mon Sep 17 00:00:00 2001 From: Angela Tran Date: Fri, 22 Dec 2023 21:50:12 +0000 Subject: [PATCH] feat: add workflow for creating a GitHub release based on tags --- .github/workflows/release.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 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 00000000..80c6ce29 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,25 @@ +on: + push: + tags: + # pre-release tag + - "20??.??.?*-rc?*" + # release tags + - "20??.??.[0-9]" + - "20??.??.[0-9][0-9]" + - "20??.??.[0-9][0-9][0-9]" + +jobs: + release: + runs-on: ubuntu-latest + permissions: + # https://github.com/softprops/action-gh-release#permissions + contents: write + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Release + uses: softprops/action-gh-release@v1 + with: + prerelease: ${{ contains(github.ref, '-rc') }} + generate_release_notes: ${{ !contains(github.ref, '-rc') }}