Skip to content

Commit bfe546f

Browse files
committed
Update to 0.2.0 and add an npm publish workflow
1 parent f0183c2 commit bfe546f

File tree

3 files changed

+29
-2
lines changed

3 files changed

+29
-2
lines changed

.github/workflows/publish.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: npm publish
2+
on:
3+
release:
4+
types: [created]
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v2
10+
# Setup .npmrc file to publish to npm
11+
- uses: actions/setup-node@v1
12+
with:
13+
node-version: '14.x'
14+
registry-url: 'https://registry.npmjs.org'
15+
- run: npm install
16+
# Publish to npm
17+
- run: npm publish --access public
18+
env:
19+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
20+
# Setup .npmrc file to publish to GitHub Packages
21+
- uses: actions/setup-node@v1
22+
with:
23+
registry-url: 'https://npm.pkg.github.com'
24+
# Publish to GitHub Packages
25+
- run: npm publish
26+
env:
27+
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "twitter-api-v2",
3-
"version": "0.1.0",
3+
"version": "0.2.0",
44
"description": "Twitter api v1 and v2 client for node",
55
"main": "dist/index.js",
66
"scripts": {

0 commit comments

Comments
 (0)