Skip to content

Commit

Permalink
feat: release-please
Browse files Browse the repository at this point in the history
  • Loading branch information
MHuiG committed May 19, 2022
1 parent a9f5743 commit 97efd35
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
name: npm-publish
on:
release:
types: [published]
workflow_dispatch:
# release:
# types: [published]

jobs:
npm-publish:
name: npm-publish
Expand All @@ -11,7 +12,7 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@master
uses: actions/setup-node@main
with:
node-version: 12
registry-url: https://registry.npmjs.org
Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: release-please
on:
push:
branches: [ dev ]
workflow_dispatch:

jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v3
with:
release-type: node
package-name: hexo-theme-volantis
npm-publish:
if: ${{ contains(github.event.head_commit.message, 'release') }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
registry-url: https://registry.npmjs.org
- name: Publish
run: |
npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.npm_token }}

0 comments on commit 97efd35

Please sign in to comment.