Skip to content

Commit c02a248

Browse files
committed
1.0.0
1 parent a5a50f0 commit c02a248

File tree

2 files changed

+29
-5
lines changed

2 files changed

+29
-5
lines changed

.github/workflows/npm.yml

+28-4
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,44 @@
11
name: Build and Publish plugin
22
on:
3-
release:
4-
types: [published]
3+
push:
4+
paths-ignore:
5+
- 'LICENSE'
6+
7+
58
jobs:
6-
build:
9+
Publish:
10+
name: Publish
11+
if: startsWith(github.ref, 'refs/tags')
712
runs-on: ubuntu-latest
813
steps:
914
- name: Checkout
1015
uses: actions/checkout@v2
16+
with:
17+
fetch-depth: 0
18+
1119
- name: Setup Node
1220
uses: actions/setup-node@v2
1321
with:
1422
node-version: '16.x'
1523
registry-url: 'https://registry.npmjs.org'
24+
1625
- name: Install dependencies and build 🔧
17-
run: npm ci
26+
run: |
27+
jq '.version="'$(git describe --tags)'"' package.json > package.json.new
28+
mv package.json.new package.json
29+
npm i
30+
31+
- name: Upload to Github
32+
if: startsWith(github.ref, 'refs/tags')
33+
uses: svenstaro/upload-release-action@v2
34+
with:
35+
repo_token: ${{ secrets.TOKEN }}
36+
file: dist/*
37+
tag: ${{ github.ref }}
38+
release_name: ${{ github.ref }}
39+
overwrite: true
40+
file_glob: true
41+
1842
- name: Publish on NPM 📦
1943
run: npm publish
2044
env:

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "docsify-plugin-meting-api",
3-
"version": "0.0.0",
3+
"version": "1.0.0",
44
"description": "A docsify.js plugin for meting-api.",
55
"author": "lisuke",
66
"license": "MIT",

0 commit comments

Comments
 (0)