Skip to content

Commit

Permalink
cd: create workflow to trigger release on GitHub (#171)
Browse files Browse the repository at this point in the history
* cd: create callable action for creating release on GItHub
* cd: call action to create release on GitHub
  • Loading branch information
felix-seifert committed Jan 8, 2024
1 parent bfe1c57 commit 0e17d01
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/release-on-github.yml
Original file line number Diff line number Diff line change
@@ -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}'
9 changes: 9 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

0 comments on commit 0e17d01

Please sign in to comment.