Skip to content
This repository has been archived by the owner on Feb 10, 2021. It is now read-only.

Commit

Permalink
fix auto publish condition
Browse files Browse the repository at this point in the history
  • Loading branch information
voldikss committed Jan 2, 2021
1 parent 74ff4b0 commit 2d374ab
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Publish and Tag
name: publish

on: push

jobs:
publish-and-tag:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -16,19 +16,22 @@ jobs:
run: |
npm install -g json
npm install
- name: Publish and Tag
- name: Publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
pkgname=$(json name < package.json)
localversion=$(json version < package.json)
remoteversion=$(npm view ${pkgname} version)
if [ ${localversion} != $remoteversion ]
echo ${localversion}
echo ${remoteversion}
if [ ${localversion} \> ${remoteversion} ]
then
npm publish
git config user.name github-actions
git config user.email [email protected]
git tag -a v${localversion} -m ${localversion}
git tag -a ${localversion} -m v${localversion}
git push --tags
fi
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# coc-todolist

![publish](https://github.com/voldikss/coc-todolist/workflows/publish/badge.svg)
[![npm version](https://badge.fury.io/js/coc-todolist.svg)](https://badge.fury.io/js/coc-todolist)

Todolist manager extension for [coc.nvim](https://github.com/neoclide/coc.nvim)

![](https://user-images.githubusercontent.com/20282795/61593014-d1be3780-ac0c-11e9-96cc-e3b787a27f46.png)
Expand Down

0 comments on commit 2d374ab

Please sign in to comment.