Skip to content

Commit

Permalink
Add output
Browse files Browse the repository at this point in the history
  • Loading branch information
robbinjanssen committed Jan 17, 2025
1 parent cc039ce commit 802167f
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions .github/workflows/draft-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,31 @@ jobs:
update-release-draft:
name: Update
runs-on: ubuntu-latest

outputs:
tag_name: ${{ steps.drafter.outputs.tag_name }}

steps:
- id: drafter
name: Run release drafter
uses: release-drafter/release-drafter@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

update-client-version:
name: Update CLIENT_VERSION with draft version
runs-on: ubuntu-latest
needs: update-release-draft

steps:
- name: Checkout repository
uses: actions/checkout@v4.2.2
with:
ref: master

- name: Run release drafter
uses: release-drafter/release-drafter@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Update `src/Client.php` with draft version
run: |
sed -i "s/CLIENT_VERSION = 'v.*';/CLIENT_VERSION = '${{ steps.update-release-draft.outputs.tag_name }}';/g" src/Client.php
sed -i "s/CLIENT_VERSION = '.*';/CLIENT_VERSION = 'v${{ needs.update-release-draft.outputs.tag_name }}';/g" src/Client.php
- name: Apply version changes
uses: stefanzweifel/git-auto-commit-action@v5.1.0
Expand Down

0 comments on commit 802167f

Please sign in to comment.