-
Notifications
You must be signed in to change notification settings - Fork 33
62 lines (52 loc) · 1.66 KB
/
Copy pathrelease-draft.yml
File metadata and controls
62 lines (52 loc) · 1.66 KB
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
---
name: Release Drafter
on:
workflow_dispatch:
push:
branches:
- master
permissions:
contents: write
pull-requests: write
jobs:
update-release-draft:
name: Update
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Run release drafter
id: draft
uses: release-drafter/release-drafter@34d80673e067bdc0c24568d3af899c216adcfaa9 # v7.7.0
with:
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
timeout-minutes: 10
needs: update-release-draft
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: master
fetch-depth: 0
persist-credentials: false
- 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: Generate app token
id: app-token
uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
with:
client-id: ${{ secrets.RELEASE_APP_CLIENT_ID }}
private-key: ${{ secrets.RELEASE_APP_PRIVATE_KEY }}
- name: Apply version changes
uses: ./.github/actions/commit-changes
with:
token: ${{ steps.app-token.outputs.token }}
message: Auto update drafter version in CLIENT_VERSION
branch: master