Skip to content

Commit

Permalink
ci: add publish workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
edumudu committed Mar 11, 2022
1 parent 8391425 commit 9b51d51
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 3 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Publish

on:
push:
tags:
- '*'

jobs:
built-publish:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Set-up node
uses: actions/setup-node@v2
with:
node-version: 16

- name: Install dependencies
run: yarn --frozen-lockfile

- uses: pocket-apps/action-update-version@v1
with:
files: ./package.json
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Publishing Library
run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}

- name: Update Package.json version
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add .
git commit -m "bump package version"
git push
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
# local-registry
# loctry

Needs node >=10.0.0 and npm >=7.0.0
9 changes: 7 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@
"license": "MIT",
"type": "module",
"keywords": [
"cli"
"cli",
"local development",
"library testing",
"library development",
"local registry",
"local npm"
],
"bin": {
"loctry": "./bin/index.mjs"
Expand All @@ -17,7 +22,7 @@
"yargs": "^17.3.1"
},
"engines": {
"node": ">=8.0.0",
"node": ">=10.0.0",
"npm": ">=7.0.0",
"yarn": ">=1.0.0"
}
Expand Down

0 comments on commit 9b51d51

Please sign in to comment.