forked from jslicense/spdx-satisfies.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add gh actions to create draft releases with new changes (#16)
- Loading branch information
1 parent
60f567d
commit 1e07d9b
Showing
6 changed files
with
149 additions
and
107 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,55 @@ | ||
# https://github.com/marketplace/actions/release-drafter#configuration | ||
|
||
name-template: 'v$RESOLVED_VERSION' | ||
tag-template: 'v$RESOLVED_VERSION' | ||
change-template: '- $TITLE @$AUTHOR (#$NUMBER)' | ||
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks. | ||
|
||
# https://github.com/release-drafter/release-drafter#version-resolver | ||
# With the version-resolver option version number incrementing can be | ||
# resolved automatically based on labels of individual pull requests. | ||
version-resolver: | ||
major: | ||
labels: | ||
- 'major' | ||
minor: | ||
labels: | ||
- 'minor' | ||
patch: | ||
labels: | ||
- 'patch' | ||
|
||
# https://github.com/release-drafter/release-drafter#categorize-pull-requests | ||
# With the categories option you can categorize pull requests in release | ||
# notes using labels. | ||
categories: | ||
- title: '💥 Breaking changes' | ||
labels: | ||
- 'major' | ||
- title: '🚀 New features' | ||
labels: | ||
- 'minor' | ||
- title: '🧰 Others' | ||
labels: | ||
- 'patch' | ||
|
||
# https://github.com/release-drafter/release-drafter#autolabeler | ||
# You can add automatically a label into a pull request, with the autolabeler | ||
# option. Available matchers are files (glob), branch (regex), title (regex) | ||
# and body (regex). Matchers are evaluated independently; the label will be | ||
# set if at least one of the matchers meets the criteria. | ||
autolabeler: | ||
- label: 'major' | ||
title: | ||
- '/^\S+!{1}:{1}\s{1}\S*/i' | ||
- label: 'minor' | ||
title: | ||
- '/^feat:{1}\s{1}\S*/i' | ||
- label: 'patch' | ||
title: | ||
- '/^(build|chore|ci|docs|fix|perf|refactor|revert|style|test):{1}\s{1}\S*/i' | ||
|
||
template: | | ||
## What’s Changed | ||
$CHANGES |
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,25 @@ | ||
name: Label checker | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- reopened | ||
- synchronize | ||
- labeled | ||
- unlabeled | ||
|
||
jobs: | ||
check_labels: | ||
name: Check for semver label | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Harden Runner | ||
uses: step-security/harden-runner@1b05615854632b887b69ae1be8cbefe72d3ae423 # v2.6.0 | ||
with: | ||
egress-policy: audit | ||
- name: Label checker | ||
uses: docker://agilepathway/pull-request-label-checker:latest | ||
with: | ||
one_of: major,minor,patch | ||
repo_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,40 @@ | ||
name: Publish to npm | ||
|
||
on: | ||
release: | ||
types: | ||
- published | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
npm-publish: | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
id-token: write | ||
|
||
steps: | ||
- name: Harden Runner | ||
uses: step-security/harden-runner@1b05615854632b887b69ae1be8cbefe72d3ae423 # v2.6.0 | ||
with: | ||
egress-policy: audit | ||
|
||
- name: Checkout | ||
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1 | ||
with: | ||
node-version: 18 | ||
registry-url: https://registry.npmjs.org | ||
|
||
- name: Install dependencies | ||
run: npm ci --production | ||
|
||
- name: Publish to npm | ||
run: | | ||
npm publish --provenance --ignore-scripts --access public | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_GUIDESMITHS }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Release drafter | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
types: | ||
- opened | ||
- reopened | ||
- synchronize | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
update_release_draft: | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Harden Runner | ||
uses: step-security/harden-runner@1b05615854632b887b69ae1be8cbefe72d3ae423 # v2.6.0 | ||
with: | ||
egress-policy: audit | ||
- uses: release-drafter/release-drafter@65c5fb495d1e69aa8c08a3317bc44ff8aabe9772 # v5.24.0 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file was deleted.
Oops, something went wrong.