-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(ci): Automated release creation (#421)
Signed-off-by: mrickard <maurice@mauricerickard.com>
- Loading branch information
Showing
9 changed files
with
549 additions
and
9 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,27 @@ | ||
<!-- | ||
Thank you for submitting a Pull Request. | ||
This code is leveraged to monitor critical services. Please consider the following: | ||
* Tests are required. | ||
* Performance matters. | ||
* Features that are specific to just your app are unlikely to make it in. | ||
Ensure that your Pull Request title adheres to our Conventional Commit standards | ||
as described in CONTRIBUTING.md | ||
Please update the Pull Request description to add relevant context or documentation about | ||
the submitted change. | ||
--> | ||
## Description | ||
|
||
Please provide a brief description of the changes introduced in this pull request. | ||
What problem does it solve? What is the context of this change? | ||
|
||
## How to Test | ||
|
||
Please describe how you have tested these changes. Have you run the code against an example application? | ||
What steps did you take to ensure that the changes are working correctly? | ||
|
||
## Related Issues | ||
|
||
Please include any related issues or pull requests in this section, using the format `Closes #<issue number>` or `Fixes #<issue number>` if applicable. |
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,13 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "npm" | ||
# Disable version updates for npm dependencies, security updates don't use this configuration | ||
# See: https://docs.github.com/en/code-security/dependabot/dependabot-security-updates/configuring-dependabot-security-updates | ||
open-pull-requests-limit: 0 | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
commit-message: | ||
prefix: "security" | ||
prefix-development: "chore" | ||
include: "scope" |
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,11 @@ | ||
name: Create Release | ||
|
||
on: [workflow_dispatch] | ||
|
||
jobs: | ||
tag-and-publish: | ||
uses: newrelic/node-newrelic/.github/workflows/release-creation.yml@main | ||
with: | ||
changelog_file: CHANGELOG.md | ||
secrets: | ||
npm_token: ${{ secrets.NODE_AGENT_NPM_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,22 @@ | ||
name: Prepare Release PR | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
release_type: | ||
description: Type of release. patch or minor (major if breaking) | ||
required: true | ||
type: choice | ||
default: patch | ||
options: | ||
- patch | ||
- minor | ||
- major | ||
|
||
jobs: | ||
release-notes: | ||
uses: newrelic/node-newrelic/.github/workflows/prep-release.yml@main | ||
with: | ||
release_type: ${{ github.event.inputs.release_type }} | ||
use_new_release: ${{ vars.USE_NEW_RELEASE }} | ||
changelog_file: CHANGELOG.md |
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,53 @@ | ||
name: Validate Pull Request | ||
|
||
permissions: | ||
pull-requests: write | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- edited | ||
- synchronize | ||
|
||
jobs: | ||
validate-pr: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Pull Request Title is Conventional | ||
id: lint_pr_title | ||
uses: amannn/action-semantic-pull-request@v5 | ||
with: | ||
# Recommended Prefixes from https://github.com/conventional-changelog/commitlint/blob/master/%40commitlint/config-conventional/README.md#type-enum | ||
types: | | ||
build | ||
chore | ||
ci | ||
docs | ||
feat | ||
fix | ||
perf | ||
refactor | ||
revert | ||
security | ||
style | ||
test | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- if: failure() | ||
name: Add PR comment if failed | ||
uses: marocchino/sticky-pull-request-comment@v2 | ||
with: | ||
header: pr-title-lint-error | ||
message: | | ||
Thank you for your contribution! We require all PR titles to follow the [Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/). | ||
Please update your PR title with the appropriate type and we'll try again! | ||
``` | ||
${{ steps.lint_pr_title.outputs.error_message}} | ||
``` | ||
- if: success() | ||
name: Remove PR comment if valid | ||
uses: marocchino/sticky-pull-request-comment@v2 | ||
with: | ||
header: pr-title-lint-error | ||
delete: true |
Oops, something went wrong.