Skip to content

Commit 1253c24

Browse files
committed
Version Bump Action
1 parent 428a439 commit 1253c24

File tree

4 files changed

+563
-1
lines changed

4 files changed

+563
-1
lines changed
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: Version bump for next minor release
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
bump_version:
8+
9+
runs-on: windows-latest
10+
env:
11+
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
12+
13+
steps:
14+
- name: Support longpaths
15+
run: git config --system core.longpaths true
16+
echo "::set-output name=ref::master"
17+
18+
- name: Checkout
19+
uses: actions/checkout@v2
20+
21+
- name: "Configure Git Credentials"
22+
run: |
23+
git config user.name "${{ github.actor }}"
24+
git config user.email "${{ github.actor }}@users.noreply.github.com"
25+
26+
- uses: actions/setup-dotnet@v1
27+
with:
28+
dotnet-version: '7.0.101'
29+
30+
- name: "CalculateNextVersion"
31+
run: .\github-actions-helpers\build.ps1 CalculateNextVersion
32+
id: versions
33+
34+
- name: "Bump Version"
35+
run: .\github-actions-helpers\build.ps1 UpdateVersion
36+
env:
37+
NewVersion: ${{ steps.versions.outputs.version }}
38+
NewIsPrerelease: ${{ steps.versions.outputs.isprerelease }}
39+
40+
- name: "Generate release notes"
41+
id: release_notes
42+
run: .\github-actions-helpers\build.ps1 GenerateReleaseNotes
43+
44+
- name: "Update Changelog"
45+
run: .\github-actions-helpers\build.ps1 UpdateChangeLog
46+
env:
47+
RELEASE_NOTES: ${{steps.release_notes.outputs.release_notes}}
48+
49+
- name: "Verify Changes"
50+
id: changes
51+
run: .\github-actions-helpers\build.ps1 VerifyChangedFilesFromVersionBump
52+
53+
- name: Create Pull Request
54+
id: pr
55+
uses: peter-evans/[email protected]
56+
with:
57+
token: ${{ secrets.GITHUB_TOKEN }}
58+
branch: "version-bump-${{steps.versions.outputs.full_version}}"
59+
commit-message: "[Version Bump] ${{steps.versions.outputs.full_version}}"
60+
delete-branch: true
61+
title: "[Version Bump] ${{steps.versions.outputs.full_version}}"
62+
reviewers: "DataDog/apm-php"
63+
body: "${{steps.changes.outputs.release_notes}}"
64+
65+
- name: Display output
66+
run: |
67+
echo "Pull Request Number - ${{ steps.pr.outputs.pull-request-number }}"
68+
echo "Pull Request URL - ${{ steps.pr.outputs.pull-request-url }}"

0 commit comments

Comments
 (0)