-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
There is no build step, but keep it for later reference.
- Loading branch information
Showing
3 changed files
with
65 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,20 @@ | ||
name: Publish to npm | ||
|
||
# https://stackoverflow.com/questions/69063452/github-actions-on-release-created-workflow-trigger-not-working | ||
on: | ||
workflow_run: | ||
workflows: ["Release on tag"] | ||
types: [completed] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: '20.x' | ||
registry-url: 'https://registry.npmjs.org' | ||
- run: npm publish --access public | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.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,32 @@ | ||
name: 'Release on tag' | ||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
release: | ||
permissions: | ||
contents: write | ||
if: startsWith(github.ref, 'refs/tags/') | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
# - uses: actions/setup-node@v3 | ||
# with: | ||
# node-version: '20.x' | ||
# registry-url: 'https://registry.npmjs.org' | ||
# - run: npm install && npm run build && npm pack | ||
|
||
- name: Build Changelog | ||
id: github_release | ||
uses: mikepenz/release-changelog-builder-action@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.RELEASE_PAT }} | ||
|
||
- name: Create Release | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
body: ${{steps.github_release.outputs.changelog}} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.RELEASE_PAT }} |
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 @@ | ||
name: Pull Request Labels | ||
on: | ||
pull_request: | ||
types: [opened, labeled, unlabeled, synchronize] | ||
jobs: | ||
label: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: mheap/github-action-required-labels@v1 | ||
with: | ||
mode: exactly | ||
count: 1 | ||
labels: "fix, feature, doc, chore, test, ignore, other, dependencies" |