Skip to content

Commit

Permalink
Add workflow to publish package
Browse files Browse the repository at this point in the history
  • Loading branch information
aulisius committed Jun 20, 2023
1 parent b33f824 commit 9322442
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/publish-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Publish Package
on:
release:
types:
- created
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 16.x
registry-url: https://npm.pkg.github.com/
scope: '@newfold-labs'
- run: npm ci
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@
"version": "1.0.0",
"main": "build/index.js",
"files": [
"build/"
"build/index.js",
"index.d.ts"
],
"types": "index.d.ts",
"scripts": {
"prepare": "npm run build",
"prepublishOnly": "npm run build",
"build": "wp-scripts build ./src/index.js --config ./scripts/webpack.config.js",
"lint": "wp-scripts lint-js ./src/index.js",
"start": "wp-scripts start ./src/index.js --config ./scripts/webpack.config.js",
Expand Down

0 comments on commit 9322442

Please sign in to comment.