Skip to content

Commit

Permalink
Merge pull request #139 from github/publish-package-from-releases
Browse files Browse the repository at this point in the history
Publish package from releases via GitHub actions.
  • Loading branch information
koddsson authored Oct 6, 2021
2 parents e52d6a9 + abd1499 commit 23aafe6
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 2 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Publish

on:
release:
types: [created]

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 14
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm run build --if-present
- run: npm test
- run: npm version ${TAG_NAME} --git-tag-version=false
env:
TAG_NAME: ${{ github.event.release.tag_name }}
- run: npm whoami; npm --ignore-scripts publish
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
- uses: actions/setup-node@v2
with:
registry-url: https://npm.pkg.github.com/
- run: npm whoami; npm --ignore-scripts publish
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint-plugin-github",
"version": "4.3.0",
"version": "0.0.0-dev",
"description": "An opinionated collection of ESLint shared configs and rules used by GitHub.",
"main": "lib/index.js",
"entries": [
Expand Down

0 comments on commit 23aafe6

Please sign in to comment.