-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore/MSSDK-2108: automated releases github workflows configuration
- Loading branch information
Showing
6 changed files
with
189 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
breaking: | ||
- head-branch: ['breaking/*', 'breaking-change/*'] | ||
|
||
fix: | ||
- head-branch: ['fix/*'] | ||
|
||
feat: | ||
- head-branch: ['feat/*'] | ||
|
||
chore: | ||
- head-branch: ['chore/*'] | ||
|
||
docs: | ||
- head-branch: ['docs/*'] | ||
|
||
refactor: | ||
- head-branch: ['refactor/*'] | ||
|
||
style: | ||
- head-branch: ['style/*'] | ||
|
||
test: | ||
- head-branch: ['test/*'] | ||
|
||
release: | ||
- head-branch: ['release/*'] |
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,52 @@ | ||
name-template: '$RESOLVED_VERSION' | ||
tag-template: '$RESOLVED_VERSION' | ||
categories: | ||
- title: 'Breaking changes' | ||
labels: | ||
- 'breaking' | ||
- 'breaking-change' | ||
- title: 'New features' | ||
labels: | ||
- 'feat' | ||
- title: 'Fixes' | ||
labels: | ||
- 'fix' | ||
- title: 'Improvements & Maintenance' | ||
labels: | ||
- 'chore' | ||
- 'docs' | ||
- 'refactor' | ||
- 'style' | ||
- 'test' | ||
version-resolver: | ||
major: | ||
labels: | ||
- 'breaking' | ||
- 'breaking-change' | ||
minor: | ||
labels: | ||
- 'feat' | ||
- 'fix' | ||
patch: | ||
labels: | ||
- 'chore' | ||
- 'docs' | ||
- 'refactor' | ||
- 'style' | ||
- 'test' | ||
default: patch | ||
replacers: | ||
- search: '/(breaking|breaking-change|feat|fix|chore|docs|refactor|style|test)\/MSSDK-\d+:\s*/' | ||
replace: '' | ||
change-template: '- $TITLE ([#$NUMBER]($URL)) by @$AUTHOR' | ||
sort-by: 'title' | ||
template: | | ||
# What's Changed | ||
$CHANGES | ||
**Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION | ||
exclude-labels: | ||
- 'skip-changelog' | ||
- 'release' |
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,44 @@ | ||
name: Finalize release | ||
|
||
on: | ||
release: | ||
types: [published] | ||
permissions: | ||
contents: read | ||
defaults: | ||
run: | ||
shell: bash | ||
|
||
env: | ||
GIT_AUTHOR_NAME: github-actions[bot] | ||
GIT_AUTHOR_EMAIL: github-actions[bot]@users.noreply.github.com | ||
GIT_COMMITTER_NAME: github-actions[bot] | ||
GIT_COMMITTER_EMAIL: github-actions[bot]@users.noreply.github.com | ||
|
||
jobs: | ||
publish: | ||
uses: ./.github/workflows/call-publish.yml | ||
permissions: | ||
contents: read | ||
packages: write | ||
with: | ||
access: public | ||
registry: registry.npmjs.org | ||
secrets: | ||
TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} | ||
|
||
merge_main_to_develop: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Merge main into develop | ||
run: | | ||
git fetch origin develop | ||
git fetch origin main | ||
git checkout develop | ||
git merge origin/main | ||
git push origin develop |
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,12 @@ | ||
name: 'Pull request labeler' | ||
on: | ||
- pull_request_target | ||
|
||
jobs: | ||
labeler: | ||
permissions: | ||
contents: read | ||
pull-requests: write | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/labeler@v5 |
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,36 @@ | ||
name: Pre-release pull request checks | ||
|
||
on: | ||
pull_request: | ||
types: [opened, synchronize, reopened, edited] | ||
branches: | ||
- main | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
process_release: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
packages: write | ||
outputs: | ||
version: ${{ steps.extract_version.outputs.version }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Check branch name and extract version | ||
id: extract_version | ||
run: | | ||
BRANCH_NAME="${{ github.event.pull_request.head.ref }}" | ||
if ! [[ $BRANCH_NAME =~ ^(release|hotfix)/([0-9]+\.[0-9]+\.[0-9]+)$ ]]; then | ||
echo "Error: Branch name must be release/x.y.z or hotfix/x.y.z" && exit 1 | ||
fi | ||
echo "version=$VERSION" >> $GITHUB_OUTPUT |
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,19 @@ | ||
name: Generate a release draft | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
generate_release_draft: | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: release-drafter/release-drafter@v5 | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} |