Skip to content

Commit

Permalink
feat: add github workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
helmisatria committed May 6, 2023
1 parent 077ee26 commit 520ba0f
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 3 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/release-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Tweet Harvest Package

on:
release:
types: [created]

jobs:
build-publish:
needs: build
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
registry-url: https://npm.pkg.github.com/
- run: npm install -g pnpm
- run: pnpm install
- run: pnpm run build
- run: pnpm run build:pkg
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
"name": "tweet-harvest",
"description": "A Twitter crawler helper with auth",
"version": "0.0.21",
"version": "0.0.23",
"license": "MIT",
"author": "Helmi Satria",
"publishConfig": {
"registry": "https://registry.npmjs.org/"
"registry": "https://registry.npmjs.org/",
"@helmisatria:registry": "https://npm.pkg.github.com/"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -37,6 +38,7 @@
"scripts": {
"start": "ts-node src/crawl.ts",
"dev": "ts-node-dev --respawn --transpile-only src/crawl.ts",
"build": "tsc"
"build": "tsc",
"build:pkg": "pkg . --out-path dist/bin"
}
}

0 comments on commit 520ba0f

Please sign in to comment.