-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cdd2dec
commit 312decc
Showing
10 changed files
with
183 additions
and
27 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,57 @@ | ||
name: Release and publish | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
permissions: {} | ||
|
||
jobs: | ||
release-please: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write # to create release commit | ||
pull-requests: write # to create release PR | ||
|
||
outputs: | ||
release_created: ${{ steps.release.outputs.release_created }} | ||
|
||
steps: | ||
- name: 🆕 Create or update release | ||
uses: google-github-actions/release-please-action@a37ac6e4f6449ce8b3f7607e4d97d0146028dc0b # 4.1.0 | ||
id: release | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
npm-publish: | ||
needs: [release-please] | ||
runs-on: ubuntu-latest | ||
permissions: | ||
id-token: write # to allow npm publish provenance generation | ||
|
||
# this if statements ensure that a publication only occurs when a new release is created: | ||
if: ${{ needs.release-please.outputs.release_created }} | ||
|
||
steps: | ||
- name: 🔐 Harden Runner | ||
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0 | ||
with: | ||
egress-policy: audit | ||
|
||
- name: 🔔 Checkout | ||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # 4.1.1. | ||
|
||
- name: ⚙️ Setup Node.js | ||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # 4.0.2 | ||
with: | ||
node-version: 20 | ||
registry-url: 'https://registry.npmjs.org' | ||
|
||
- name: 📦 Install dependencies | ||
run: npm ci | ||
|
||
- name: 🚀 Publish to npm | ||
run: npm publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
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,37 @@ | ||
name: Semantic Pull Request | ||
|
||
on: | ||
pull_request_target: | ||
types: | ||
- opened | ||
- edited | ||
- synchronize | ||
|
||
permissions: | ||
pull-requests: read | ||
|
||
jobs: | ||
lint: | ||
name: Validate Pull Request title format | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: 🔐 Harden Runner | ||
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0 | ||
with: | ||
egress-policy: audit | ||
|
||
- name: 🔎 Validate Pull Request format | ||
uses: amannn/action-semantic-pull-request@e9fabac35e210fea40ca5b14c0da95a099eff26f # v5.4.0 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
# Configure additional validation for the subject based on a regex. | ||
# This ensures the subject doesn't start with an uppercase character. | ||
subjectPattern: ^(?![A-Z]).+$ | ||
# If `subjectPattern` is configured, you can use this property to override | ||
# the default error message that is shown when the pattern doesn't match. | ||
# The variables `subject` and `title` can be used within the message. | ||
subjectPatternError: | | ||
The subject "{subject}" found in the pull request title "{title}" | ||
didn't match the configured pattern. Please ensure that the subject | ||
doesn't start with an uppercase character. |
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,2 @@ | ||
provenance=true | ||
access=public |
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,3 @@ | ||
{ | ||
".": "0.1.0" | ||
} |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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 |
---|---|---|
@@ -0,0 +1,57 @@ | ||
{ | ||
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json", | ||
"release-type": "node", | ||
"pull-request-footer": "This PR was generated with [Release Please](https://github.com/googleapis/release-please).", | ||
"changelog-sections": [ | ||
{ | ||
"type": "feat", | ||
"section": "🆕 Features", | ||
"hidden": false | ||
}, | ||
{ | ||
"type": "fix", | ||
"section": "🐛 Bug Fixes", | ||
"hidden": false | ||
}, | ||
{ | ||
"type": "chore", | ||
"section": "🔧 Others", | ||
"hidden": false | ||
}, | ||
{ | ||
"type": "docs", | ||
"section": "📝 Docs", | ||
"hidden": false | ||
}, | ||
{ | ||
"type": "style", | ||
"section": "🎨 Styling", | ||
"hidden": false | ||
}, | ||
{ | ||
"type": "refactor", | ||
"section": "🔄 Code Refactoring", | ||
"hidden": false | ||
}, | ||
{ | ||
"type": "perf", | ||
"section": "📈 Performance Improvements", | ||
"hidden": false | ||
}, | ||
{ | ||
"type": "test", | ||
"section": "🔬 Tests", | ||
"hidden": false | ||
}, | ||
{ | ||
"type": "ci", | ||
"section": "☁️ CI", | ||
"hidden": false | ||
} | ||
], | ||
"packages": { | ||
".": { | ||
"package-name": "" | ||
} | ||
} | ||
} |