-
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.
ref: run publish workflow when making a realease
- Loading branch information
1 parent
c3c6221
commit 8f75a2c
Showing
2 changed files
with
15 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 |
---|---|---|
@@ -1,30 +1,21 @@ | ||
name: Publish | ||
name: Publish to NPM | ||
on: | ||
push: | ||
branches: | ||
- "master" | ||
|
||
concurrency: ${{ github.workflow }}-${{ github.ref }} | ||
|
||
release: | ||
types: [created] | ||
jobs: | ||
publish: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: pnpm/action-setup@v2 | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Setup Node | ||
uses: actions/setup-node@v2 | ||
with: | ||
version: 8 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18.x | ||
cache: "pnpm" | ||
|
||
- run: pnpm install --frozen-lockfile | ||
- name: Create Release Pull Request or Publish | ||
id: changesets | ||
uses: changesets/action@v1 | ||
with: | ||
publish: pnpm run release | ||
node-version: '14.x' | ||
registry-url: 'https://registry.npmjs.org' | ||
- name: Install dependencies and build 🔧 | ||
run: npm ci && npm run build | ||
- name: Publish package on NPM 📦 | ||
run: npm publish | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
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 |
---|---|---|
|
@@ -7,9 +7,6 @@ | |
"wifikeys": "./dist/bin.js" | ||
}, | ||
"author": "FADHILI Josue <[email protected]>", | ||
"files": [ | ||
"./dist/bin.js" | ||
], | ||
"scripts": { | ||
"build": "esbuild --bundle src/bin.ts --platform=node --outfile=dist/bin.js --packages=external --format=esm --minify", | ||
"dev": "run-p dev:*", | ||
|