-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (37 loc) · 1.21 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: main
on: push
jobs:
build:
name: 🆙 Increase version
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- run: git config --global user.email "[email protected]"
- run: git config --global user.name "Keegan Cruickshank"
- name: 'Get Previous tag'
id: previoustag
uses: "WyriHaximus/github-action-get-previous-tag@v1"
with:
fallback: 1.0.0 # Optional fallback tag to use when no tag can be found
- name: 'Get next minor version'
id: semvers
uses: "WyriHaximus/github-action-next-semvers@v1"
with:
version: ${{ steps.previoustag.outputs.tag }}
- name: Update npm package
uses: actions/setup-node@v3
with:
node-version: '16.x'
registry-url: 'https://registry.npmjs.org'
- name: Create new tag
uses: rickstaa/action-create-tag@v1
with:
tag: ${{ steps.semvers.outputs.patch }}
message: "Latest release"
- run: npm version ${{ steps.semvers.outputs.patch }}
- run: yarn install
- run: yarn publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}