-
Notifications
You must be signed in to change notification settings - Fork 118
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added PR title checker & continuous release workflow
Signed-off-by: Eddie Knight <[email protected]>
- Loading branch information
1 parent
33147d4
commit 1dc2b48
Showing
4 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 @@ | ||
--- | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: / | ||
schedule: | ||
interval: "weekly" | ||
timezone: "America/Los_Angeles" | ||
labels: | ||
- "dependabot" | ||
- "dependencies" | ||
- "github-actions" | ||
commit-message: | ||
prefix: "chore(deps)" | ||
|
||
- package-ecosystem: "npm" # See documentation for possible values | ||
directory: / | ||
schedule: | ||
interval: "weekly" | ||
timezone: "America/Los_Angeles" | ||
labels: | ||
- "dependabot" | ||
- "dependencies" | ||
- "npm" | ||
commit-message: | ||
prefix: "chore(deps)" |
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,68 @@ | ||
--- | ||
name-template: 'v$RESOLVED_VERSION' | ||
tag-template: 'v$RESOLVED_VERSION' | ||
template: | | ||
# Changelog | ||
$CHANGES | ||
See details of [all code changes](https://github.com/finos/git-proxy/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION) since previous release | ||
categories: | ||
- title: ':rocket: Features' | ||
labels: | ||
- 'feature' | ||
- 'enhancement' | ||
- title: ':bug: Bug Fixes' | ||
labels: | ||
- 'fix' | ||
- 'bugfix' | ||
- 'bug' | ||
- title: ':gear: Maintenance' | ||
labels: | ||
- 'infrastructure' | ||
- 'automation' | ||
- 'documentation' | ||
- 'dependencies' | ||
- 'maintenance' | ||
- 'revert' | ||
- title: ':racing_car: Performance' | ||
label: 'performance' | ||
change-template: '- $TITLE @$AUTHOR (#$NUMBER)' | ||
version-resolver: | ||
major: | ||
labels: | ||
- 'breaking' | ||
minor: | ||
labels: | ||
- 'enhancement' | ||
patch: | ||
labels: | ||
- 'fix' | ||
- 'documentation' | ||
- 'maintenance' | ||
default: patch | ||
autolabeler: | ||
- label: 'automation' | ||
title: | ||
- '/^(build|ci|perf|refactor|test).*/i' | ||
- label: 'enhancement' | ||
title: | ||
- '/^(style).*/i' | ||
- label: 'documentation' | ||
title: | ||
- '/^(docs).*/i' | ||
- label: 'feature' | ||
title: | ||
- '/^(feat).*/i' | ||
- label: 'fix' | ||
title: | ||
- '/^(fix).*/i' | ||
- label: 'infrastructure' | ||
title: | ||
- '/^(infrastructure).*/i' | ||
- label: 'maintenance' | ||
title: | ||
- '/^(chore|maintenance).*/i' | ||
- label: 'revert' | ||
title: | ||
- '/^(revert).*/i' |
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,41 @@ | ||
## Reference: https://github.com/amannn/action-semantic-pull-request | ||
--- | ||
name: "Lint PR" | ||
|
||
on: | ||
pull_request_target: | ||
types: | ||
- opened | ||
- edited | ||
- synchronize | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
main: | ||
permissions: | ||
pull-requests: read | ||
statuses: write | ||
name: Validate PR title | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: amannn/action-semantic-pull-request@v5 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
# Configure which types are allowed (newline-delimited). | ||
# From: https://github.com/commitizen/conventional-commit-types/blob/master/index.json | ||
# listing all below | ||
types: | | ||
build | ||
chore | ||
ci | ||
docs | ||
feat | ||
fix | ||
perf | ||
refactor | ||
revert | ||
style | ||
test |
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,54 @@ | ||
--- | ||
name: Release | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
create_github_release: | ||
outputs: | ||
full-tag: ${{ steps.release-drafter.outputs.tag_name }} | ||
short-tag: ${{ steps.get_tag_name.outputs.SHORT_TAG }} | ||
body: ${{ steps.release-drafter.outputs.body }} | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
pull-requests: read | ||
steps: | ||
- uses: release-drafter/release-drafter@v6 | ||
id: release-drafter | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
config-name: release-drafter.yml | ||
publish: true | ||
- name: Get the short tag | ||
id: get_tag_name | ||
run: | | ||
short_tag=$(echo ${{ steps.release-drafter.outputs.tag_name }} | cut -d. -f1) | ||
echo "SHORT_TAG=$short_tag" >> $GITHUB_OUTPUT | ||
create_npm_release: | ||
if: github.event.pull_request.head.repo.full_name == github.repository # Everything but this step can be tested on a fork | ||
needs: create_release | ||
runs-on: ubuntu-latest | ||
permissions: | ||
packages: write | ||
env: | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: ${{ github.repository }} | ||
steps: | ||
- uses: actions/checkout@8459bc0 # v4 | ||
- uses: actions/setup-node@c2ac33f # v4, Setup .npmrc file to publish to npm | ||
with: | ||
node-version: '18.x' | ||
registry-url: 'https://registry.npmjs.org' | ||
- run: npm ci | ||
- run: npm publish --access=public | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |