Skip to content

Commit

Permalink
fix step
Browse files Browse the repository at this point in the history
  • Loading branch information
robbinjanssen committed Jan 17, 2025
1 parent 6d15775 commit a86ce5b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 13 deletions.
18 changes: 6 additions & 12 deletions .github/workflows/draft-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,20 @@ jobs:
update-release-draft:
name: Update
runs-on: ubuntu-latest
steps:
- 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 = '${{ needs.update-release-draft.outputs.tag_name }}';/g" src/Client.php
sed -i "s/CLIENT_VERSION = 'v.*';/CLIENT_VERSION = '${{ steps.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
2 changes: 1 addition & 1 deletion src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class Client implements LoggerAwareInterface
/**
* The version of this package. Used in the user-agent header.
*/
public const CLIENT_VERSION = '';
public const CLIENT_VERSION = 'v3.1.3';

/**
* The API base URL.
Expand Down

0 comments on commit a86ce5b

Please sign in to comment.