Skip to content

Commit

Permalink
Merge pull request #34 from rwillians/gha-publish
Browse files Browse the repository at this point in the history
Moving off TravisCI: Add publish workflow
  • Loading branch information
rwillians authored Aug 4, 2022
2 parents b4c36f9 + 6ca4c26 commit 756c9f1
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 3 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Release

on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'

jobs:
publish:
name: Publish package
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- uses: actions/setup-node@v2
with:
node-version: 18
registry-url: 'https://registry.npmjs.org'

- name: Tag matches package's and package-lock's version
run: |
node -e "const tag = process.env.GITHUB_REF.replace('refs/tags/v', ''); process.exit(require('./package.json').version === tag && require('./package-lock.json').version === tag ? 0 : 1);"
- name: Prepare package for publishing
run: |
npm install
npm run build
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
4 changes: 2 additions & 2 deletions 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": "express-rescue",
"version": "1.1.31",
"version": "1.1.32",
"description": "A wrapper for async functions which makes sure all async errors are passed to your errors handler",
"license": "MIT",
"keywords": [
Expand Down

0 comments on commit 756c9f1

Please sign in to comment.