From a4b3c4270abfb146a8abced47c00d6636418ae10 Mon Sep 17 00:00:00 2001 From: piloulacdog Date: Tue, 19 May 2026 10:04:26 +0100 Subject: [PATCH] feat: create release worklow --- .github/workflows/release.yml | 36 ++++++++++++++++++++++++++++ .github/workflows/test-platforms.yml | 3 +++ 2 files changed, 39 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..9b6f94f --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,36 @@ +name: Release new version + +on: + push: + tags: + - "v[0-9]+.[0-9]+.[0-9]+" # e.g. v4.3.0 (excludes major aliases like v4 to not duplicate releases) + +permissions: {} + +jobs: + tests: + name: Run platform tests + uses: ./.github/workflows/test-platforms.yml + + draft-release: + name: Create draft GitHub release + needs: tests # only create a release if tests pass + runs-on: ubuntu-latest + permissions: + contents: write # to create the release + steps: + - name: Checkout + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + with: + fetch-depth: 0 + persist-credentials: false + + - name: Create draft release + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + TAG: ${{ github.ref_name }} + run: | + gh release create "$TAG" \ + --draft \ + --title "$TAG" \ + --generate-notes diff --git a/.github/workflows/test-platforms.yml b/.github/workflows/test-platforms.yml index dc9d8f3..7349a0f 100644 --- a/.github/workflows/test-platforms.yml +++ b/.github/workflows/test-platforms.yml @@ -2,7 +2,10 @@ name: Test Platforms on: push: + branches: + - "**" workflow_dispatch: + workflow_call: jobs: test-platforms: