From 5ed4ce29b1dd159ee0ecc3208c887ff257724fd6 Mon Sep 17 00:00:00 2001 From: Felix Seifert Date: Thu, 4 Jan 2024 20:46:40 +0100 Subject: [PATCH 1/2] cd: create callable action for creating release on GItHub --- .github/workflows/release-on-github.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/release-on-github.yml diff --git a/.github/workflows/release-on-github.yml b/.github/workflows/release-on-github.yml new file mode 100644 index 00000000..2d2f1dcf --- /dev/null +++ b/.github/workflows/release-on-github.yml @@ -0,0 +1,23 @@ +name: github-release + +on: + workflow_call: + inputs: + tag: + required: true + type: string + +jobs: + create-release: + runs-on: ubuntu-latest + steps: + + - name: Create GitHub release + run: | + curl -L \ + -X POST \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + https://api.github.com/repos/spotify/github-java-client/releases \ + -d '{"tag_name":"${{ inputs.tag }}","target_commitish":"master","draft":false,"prerelease":false,"generate_release_notes":true}' \ No newline at end of file From 22af4821d6fc585385bedfdcfc149ebb573714ec Mon Sep 17 00:00:00 2001 From: Felix Seifert Date: Mon, 8 Jan 2024 06:37:21 +0100 Subject: [PATCH 2/2] cd: call action to create release on GitHub --- .github/workflows/release.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0a56e5ca..b98ebdd0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -44,3 +44,12 @@ jobs: uses: codecov/codecov-action@v3 with: token: ${{ secrets.CODECOV_TOKEN }} + + + trigger-github-release: + needs: build + name: Trigger GitHub release workflow + if: github.ref_type == 'tag' + uses: ./.github/workflows/release-on-github.yml + with: + tag: ${{ github.ref_name }}