Skip to content

Commit 046013d

Browse files
committed
chore: try to add github actions
1 parent 6895bb4 commit 046013d

File tree

3 files changed

+62
-1
lines changed

3 files changed

+62
-1
lines changed

.github/workflows/bump.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Bump version
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: 'Semver type of new version (major / minor / patch)'
8+
required: true
9+
10+
jobs:
11+
bump-version:
12+
name: Bump version
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Check out source
16+
uses: actions/checkout@v2
17+
18+
- name: Setup Node.js
19+
uses: actions/setup-node@v2
20+
with:
21+
node-version: '16'
22+
cache: 'npm'
23+
24+
- name: Install dependencies
25+
uses: bahmutov/npm-install@v1
26+
27+
- name: Setup Git
28+
run: |
29+
git config user.name 'Ivan Galiatin'
30+
git config user.email '[email protected]'
31+
32+
- name: bump version
33+
run: npm version ${{ github.event.inputs.version }}
34+
35+
- name: Push latest version
36+
run: git push origin master --follow-tags

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
runs-on: ${{ matrix.os }}
88
strategy:
99
matrix:
10-
node: ['12.x', '14.x']
10+
node: ['12.x', '14.x', '16.x']
1111
os: [ubuntu-latest, windows-latest, macOS-latest]
1212

1313
steps:

.github/workflows/publish.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Publish
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
publish-npm:
9+
name: 'Publish to npm'
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
14+
- uses: actions/setup-node@v2
15+
with:
16+
node-version: 'lts/*'
17+
registry-url: https://registry.npmjs.org/
18+
19+
- run: yarn install
20+
21+
- run: yarn build
22+
23+
- run: npm publish --access public
24+
env:
25+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

0 commit comments

Comments
 (0)