From c9e369e3e7ce1f047c3317f437094acff77dc68b Mon Sep 17 00:00:00 2001 From: SylvainJuge <763082+SylvainJuge@users.noreply.github.com> Date: Thu, 25 Apr 2024 11:06:26 +0200 Subject: [PATCH] add GH release to release workflow (#229) --- .github/workflows/release.yml | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c5c5b069..4ed6f083 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -33,6 +33,7 @@ concurrency: env: RELEASE_VERSION: ${{ inputs.version }} + RELEASE_VERSION_TAG: v${{ inputs.version }} jobs: validate-tag: @@ -50,7 +51,7 @@ jobs: - name: Validate release tag does not exist in repo uses: ./.github/workflows/validate-tag with: - tag: v${{ env.RELEASE_VERSION }} + tag: ${{ env.RELEASE_VERSION_TAG }} - name: Validate tag match current version run: | if [ "$(./gradlew -q currentVersion)" != "${{ env.RELEASE_VERSION }}" ]; then @@ -152,3 +153,23 @@ jobs: version: ${{ inputs.version }} phase: 'post' secrets: inherit + + create-github-release: + name: "Create GitHub Release" + needs: + - await-maven-central-artifact + runs-on: ubuntu-latest + if: ${{ ! inputs.dry_run }} + permissions: + contents: write + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ inputs.ref }} + - name: Create GitHub Release + env: + GH_TOKEN: ${{ github.token }} + run: | + gh release create ${{ env.RELEASE_VERSION_TAG }} \ + --title="Release ${{ env.RELEASE_VERSION }}" \ + --notes=""