Skip to content

Commit

Permalink
automate publishing to NPM
Browse files Browse the repository at this point in the history
  • Loading branch information
ayoisaiah committed Oct 2, 2023
1 parent 8536831 commit 1f9ec68
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/npm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Publish to NPM

on:
workflow_dispatch:
push:
tags:
- 'v*'

jobs:
build:
name: Publish new Focus version
runs-on: ubuntu-latest

steps:
- name: Check out the code
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Setup Node.js
uses: actions/setup-node@v3
with:
registry-url: https://registry.npmjs.org/
node-version: '20'

- name: Publish
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
22 changes: 22 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "@ayoisaiah/focus",
"version": "1.3.0",
"description": "Focus is a command-line productivity timer based on the Pomodoro Technique",
"main": "",
"repository": "https://github.com/ayoisaiah/focus",
"author": "Ayooluwa Isaiah <[email protected]>",
"license": "MIT",
"dependencies": {
"@ayoisaiah/go-npm": "^0.1.13"
},
"scripts": {
"postinstall": "go-npm install",
"preuninstall": "go-npm uninstall"
},
"goBinary": {
"name": "focus",
"path": "./bin",
"url": "https://github.com/ayoisaiah/focus/releases/download/v{{version}}/focus_{{version}}_{{platform}}_{{arch}}.tar.gz"
},
"private": false
}

0 comments on commit 1f9ec68

Please sign in to comment.