-
Notifications
You must be signed in to change notification settings - Fork 33
42 lines (34 loc) · 1.01 KB
/
draft-release.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
---
name: Release Drafter
on:
push:
branches:
- master
jobs:
update-release-draft:
name: Update
runs-on: ubuntu-latest
steps:
- name: Run release drafter
id: draft
uses: release-drafter/release-drafter@v6
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@v4
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@v5
with:
commit_message: Auto update drafter version in CLIENT_VERSION