Skip to content

Commit

Permalink
DEV: Add release workflow (#16)
Browse files Browse the repository at this point in the history
closes #16
  • Loading branch information
dwhieb committed Oct 8, 2024
1 parent de9e865 commit e883649
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Contributing

## Release Workflow

1. Update the version number locally then push the tag to GitHub.
2. Create a release on GitHub.
3. A GitHub Action automatically publishes the release to npm.
29 changes: 29 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Release

on:
release:
types: [published]

jobs:
release:
runs-on: ubuntu-latest
steps:

- name: Check out repo
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: latest

- name: Install dependencies
run: npm ci

- name: Run tests
run: npm test

- name: Publish to npm
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: test
name: Test

on:
push:
Expand Down

0 comments on commit e883649

Please sign in to comment.