Skip to content

Commit

Permalink
Merge pull request #110 from exonet/rja/auto-update-client-version
Browse files Browse the repository at this point in the history
Automatically update the client version after a push to master
  • Loading branch information
trizz authored Apr 25, 2022
2 parents 2b75850 + 96a7ab8 commit 56878f6
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/draft-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,30 @@ jobs:

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

outputs:
draft-version: ${{ steps.draft.outputs.tag_name }}

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@v3
with:
ref: master

- name: Update `src/Powerdns.php` with draft version
run: |
sed -i "s/CLIENT_VERSION = 'v.*';/CLIENT_VERSION = '${{ needs.update-release-draft.outputs.draft-version }}';/g" src/Powerdns.php
- name: Apply version changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Auto update drafter version in CLIENT_VERSION

0 comments on commit 56878f6

Please sign in to comment.