-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: update ci with reusable workflows and new release flow (#61)
- Loading branch information
Showing
5 changed files
with
64 additions
and
151 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 |
---|---|---|
@@ -1,85 +1 @@ | ||
name-template: '$RESOLVED_VERSION' | ||
tag-template: '$RESOLVED_VERSION' | ||
|
||
change-template: '- $TITLE (#$NUMBER) by @$AUTHOR' | ||
|
||
|
||
autolabeler: | ||
- label: 'type: feature' | ||
title: | ||
- '/feat:.*/' | ||
- '/feature:.*/' | ||
- label: 'type: fix' | ||
branch: | ||
- '/fix.+/' | ||
- '/bug.+/' | ||
title: | ||
- '/fix:.*/' | ||
- '/bugfix:.*/' | ||
- '/bug:.*/' | ||
- label: 'type: chore' | ||
files: | ||
- '*.md' | ||
- '*.txt' | ||
- label: 'type: docs' | ||
branch: | ||
- '/docs.+/' | ||
title: | ||
- '/docs:.*/' | ||
- label: 'type: refactor' | ||
title: | ||
- '/ref:.*/' | ||
- '/refactor:.*/' | ||
- label: 'type: style' | ||
title: | ||
- '/style:.*/' | ||
- label: 'type: performance' | ||
title: | ||
- '/perf:.*/' | ||
- '/performance:.*/' | ||
- label: 'type: test' | ||
title: | ||
- '/test:.*/' | ||
- '/tests:.*/' | ||
files: | ||
- 'tests/*' | ||
- label: 'type: ci' | ||
title: | ||
- '/ci:.*/' | ||
files: | ||
- '.github/*' | ||
|
||
|
||
categories: | ||
- title: 'Breaking' | ||
label: 'type: breaking' | ||
- title: 'Features' | ||
label: 'type: feature' | ||
- title: 'Fixes' | ||
label: 'type: fix' | ||
- title: 'Documentation' | ||
label: 'type: docs' | ||
- title: 'CI/CD' | ||
labels: | ||
- 'type: test' | ||
- 'type: ci' | ||
- title: 'Enhancement' | ||
labels: | ||
- 'type: refactor' | ||
- 'type: performance' | ||
- 'type: style' | ||
- title: 'Other changes' | ||
|
||
version-resolver: | ||
major: | ||
labels: | ||
- 'type: breaking' | ||
minor: | ||
labels: | ||
- 'type: feature' | ||
default: patch | ||
|
||
template: | | ||
$CHANGES | ||
**Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...$RESOLVED_VERSION | ||
_extends: .github:.github/release-drafter.yml |
This file was deleted.
Oops, something went wrong.
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,25 +1,25 @@ | ||
name: Release Drafter | ||
|
||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
# pull_request events is required only for autolabeler | ||
pull_request: | ||
types: [opened, reopened, synchronize] | ||
pull_request_target: | ||
types: [opened, reopened, synchronize] | ||
|
||
|
||
permissions: | ||
contents: read | ||
contents: write | ||
|
||
|
||
concurrency: | ||
group: ${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
|
||
jobs: | ||
update_release_draft: | ||
permissions: | ||
contents: write # for release-drafter/release-drafter to create a github release | ||
pull-requests: write # for release-drafter/release-drafter to add label to PR | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: release-drafter/release-drafter@v5 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GITHUB_TOKEN: ${{ secrets.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Sync PR | ||
|
||
on: | ||
pull_request_target: | ||
types: | ||
- opened | ||
- edited | ||
- synchronize | ||
- labeled | ||
- unlabeled | ||
- reopened | ||
|
||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number }} | ||
cancel-in-progress: true | ||
|
||
|
||
jobs: | ||
autolabel_pr: | ||
permissions: | ||
pull-requests: write | ||
runs-on: ubuntu-latest | ||
if: github.event.action == 'opened' || github.event.action == 'reopened' || github.event.action == 'edited' | ||
steps: | ||
- uses: release-drafter/release-drafter@v5 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
validate_pr: | ||
needs: [autolabel_pr] | ||
if: ${{ always() && !failure() && !cancelled() }} # no needs jobs are failed or cancelled | ||
uses: manytask/.github/.github/workflows/reusable-validate-pr.yml@main | ||
permissions: | ||
pull-requests: read | ||
contents: read |