-
Notifications
You must be signed in to change notification settings - Fork 293
51 lines (42 loc) · 1.6 KB
/
post-release.yml
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
name: Complete release
on:
workflow_dispatch:
inputs:
tag:
required: true
description: 'Release tag'
type: string
release:
types: [published]
jobs:
automation:
uses: ./.github/workflows/automation.yml
secrets: inherit
post-release:
runs-on: ubuntu-latest
needs:
- automation
if: needs.automation.outputs.enabled
env:
GH_TOKEN: ${{ secrets[needs.automation.outputs.token-secret-name] }}
steps:
- uses: actions/checkout@v4
with:
# Note: By default GitHub only fetches 1 commit. We need all the tags
# for this work.
fetch-depth: 0
ref: ${{ github.event.repository.default_branch }}
token: ${{ secrets[needs.automation.outputs.token-secret-name] }}
- name: Create GitHub Pull Request to update PackageValidationBaselineVersion in projects
if: |
(github.ref_type == 'tag' && !contains(github.ref_name, '-alpha') && !contains(github.ref_name, '-beta') && !contains(github.ref_name, '-rc'))
|| (inputs.tag && !contains(inputs.tag, '-alpha') && !contains(inputs.tag, '-beta') && !contains(inputs.tag, '-rc'))
shell: pwsh
run: |
Import-Module .\build\scripts\post-release.psm1
CreatePackageValidationBaselineVersionUpdatePullRequest `
-gitRepository '${{ github.repository }}' `
-tag '${{ inputs.tag || github.ref_name }}' `
-targetBranch '${{ github.event.repository.default_branch }}' `
-gitUserName '${{ needs.automation.outputs.username }}' `
-gitUserEmail '${{ needs.automation.outputs.email }}'