-
Notifications
You must be signed in to change notification settings - Fork 772
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into shared-tagwriter-cleanup-and-improvements
- Loading branch information
Showing
36 changed files
with
733 additions
and
228 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,139 @@ | ||
name: Prepare for a release | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
tag-prefix: | ||
type: choice | ||
options: | ||
- core- | ||
- coreunstable- | ||
description: 'Release tag prefix' | ||
required: true | ||
version: | ||
type: string | ||
description: 'Release version' | ||
required: true | ||
|
||
pull_request: | ||
types: | ||
- closed | ||
|
||
issue_comment: | ||
types: | ||
- created | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
jobs: | ||
prepare-release-pr: | ||
if: github.event_name == 'workflow_dispatch' | ||
|
||
runs-on: windows-latest | ||
|
||
steps: | ||
- name: check out code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Create GitHub Pull Request to prepare release | ||
shell: pwsh | ||
run: | | ||
Import-Module .\build\scripts\prepare-release.psm1 | ||
CreatePullRequestToUpdateChangelogsAndPublicApis ` | ||
-minVerTagPrefix '${{ inputs.tag-prefix }}' ` | ||
-version '${{ inputs.version }}' ` | ||
-targetBranch '${{ github.ref_name }}' | ||
env: | ||
GH_TOKEN: ${{ github.token }} | ||
|
||
lock-pr-and-post-notice-to-create-release-tag: | ||
if: | | ||
github.event_name == 'pull_request' | ||
&& github.event.action == 'closed' | ||
&& github.event.pull_request.user.login == 'github-actions[bot]' | ||
&& github.event.pull_request.merged == true | ||
&& startsWith(github.event.pull_request.title, '[repo] Prepare release ') | ||
runs-on: windows-latest | ||
|
||
steps: | ||
- name: check out code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Lock GitHub Pull Request to prepare release | ||
shell: pwsh | ||
run: | | ||
Import-Module .\build\scripts\prepare-release.psm1 | ||
LockPullRequestAndPostNoticeToCreateReleaseTag ` | ||
-pullRequestNumber '${{ github.event.pull_request.number }}' | ||
env: | ||
GH_TOKEN: ${{ github.token }} | ||
|
||
create-release-tag-unlock-pr-post-notice: | ||
if: | | ||
github.event_name == 'issue_comment' | ||
&& github.event.issue.pull_request | ||
&& github.event.issue.locked == true | ||
&& contains(github.event.comment.body, '/CreateReleaseTag') | ||
&& startsWith(github.event.issue.title, '[repo] Prepare release ') | ||
&& github.event.issue.pull_request.merged_at | ||
runs-on: windows-latest | ||
|
||
outputs: | ||
tag: ${{ steps.create-tag.outputs.tag }} | ||
|
||
steps: | ||
- name: check out code | ||
uses: actions/checkout@v4 | ||
with: | ||
# Note: By default GitHub only fetches 1 commit which fails the git tag operation below | ||
fetch-depth: 0 | ||
|
||
- name: Create release tag | ||
id: create-tag | ||
shell: pwsh | ||
run: | | ||
Import-Module .\build\scripts\prepare-release.psm1 | ||
$tag = '' | ||
CreateReleaseTag ` | ||
-pullRequestNumber '${{ github.event.issue.number }}' ` | ||
-actionRunId '${{ github.run_id }}' ` | ||
-tag ([ref]$tag) | ||
echo "tag=$tag" >> $env:GITHUB_OUTPUT | ||
env: | ||
GH_TOKEN: ${{ github.token }} | ||
|
||
invoke-package-workflow: | ||
needs: create-release-tag-unlock-pr-post-notice | ||
uses: ./.github/workflows/publish-packages-1.0.yml | ||
with: | ||
tag: ${{ needs.create-release-tag-unlock-pr-post-notice.outputs.tag }} | ||
|
||
post-packages-ready-notice: | ||
needs: | ||
- create-release-tag-unlock-pr-post-notice | ||
- invoke-package-workflow | ||
runs-on: windows-latest | ||
steps: | ||
- name: check out code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Post notice when packages are ready | ||
shell: pwsh | ||
run: | | ||
Import-Module .\build\scripts\prepare-release.psm1 | ||
PostPackagesReadyNotice ` | ||
-pullRequestNumber '${{ github.event.issue.number }}' ` | ||
-tag '${{ needs.create-release-tag-unlock-pr-post-notice.outputs.tag }}' ` | ||
-packagesUrl '${{ needs.invoke-package-workflow.outputs.artifact-url }}' | ||
env: | ||
GH_TOKEN: ${{ github.token }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,12 @@ | ||
# Default state for all rules | ||
default: true | ||
|
||
# allow long lines for tables and code blocks | ||
# MD013/line-length : Line length : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md013.md | ||
MD013: | ||
code_blocks: false | ||
tables: false | ||
|
||
# MD033/no-inline-html : Inline HTML : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md033.md | ||
MD033: | ||
# Allowed elements | ||
allowed_elements: [ 'details', 'summary' ] |
Oops, something went wrong.