Skip to content

Commit

Permalink
Create npm releases on github tags
Browse files Browse the repository at this point in the history
  • Loading branch information
Danielv123 committed Nov 24, 2021
1 parent df6404e commit b2c6254
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
21 changes: 11 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ name: CI
on:
push:
pull_request:
release:
types: [published]
create:
tags:
- v*

workflow_dispatch:

Expand All @@ -14,13 +15,13 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 16.x
- run: npm i --no-optional
- run: npm i eslint eslint-plugin-node
- run: npm run lint
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 16.x
- run: npm i --no-optional
- run: npm i eslint eslint-plugin-node
- run: npm run lint
lualint:
name: Luacheck
runs-on: ubuntu-latest
Expand All @@ -36,7 +37,7 @@ jobs:
name: "Publish to npm"
runs-on: ubuntu-latest

if: github.event.release.action == 'released'
if: github.event.ref_type == 'tag' && startsWith(github.event.ref, 'v')
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
Expand Down
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}

0 comments on commit b2c6254

Please sign in to comment.