Skip to content

Commit

Permalink
Change to use github actions (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
bameyrick authored Oct 3, 2024
1 parent 5c507e7 commit a982b16
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 24 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Publish to NPM

on:
release:
types: [created]

jobs:
publish:
runs-on: ubuntu-latest

steps:
- name: Checkout repository 🛒
uses: actions/checkout@v3

- name: Set node version 🤖
run: echo "NODE_VERSION=$(cat .nvmrc)" >> $GITHUB_OUTPUT
id: nvm

- name: Set up Node.js ${{ steps.nvm.outputs.NODE_VERSION }} 🤖
uses: actions/setup-node@v3
with:
node-version: ${{ steps.nvm.outputs.NODE_VERSION }}
registry-url: 'https://registry.npmjs.org'

- name: Install dependencies 🌀
run: npm install

- name: Build 👷🏼‍♂️
run: npm run build

- name: Set details 👨🏻‍💻
run: git config --global user.email "[email protected]" && git config --global user.name "Ben Meyrick"

- name: Publish package on NPM 📦
run: npm version ${{github.ref_name}} --allow-same-version --allow-empty --no-git-tag-version && npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
24 changes: 0 additions & 24 deletions .travis.yml

This file was deleted.

0 comments on commit a982b16

Please sign in to comment.