-
Notifications
You must be signed in to change notification settings - Fork 2
37 lines (37 loc) · 1.07 KB
/
publish.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
name: "Publish"
on:
push:
branches:
- main
jobs:
release:
name: "Release"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- run: yarn
- run: yarn build
- run: yarn version --patch --no-git-tag-version
- run: git config core.hooksPath /dev/null
- uses: EndBug/add-and-commit@v7
with:
branch: main
message: "New version release"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}
- name: get-npm-version
id: package-version
uses: martinbeentjes/npm-get-version-action@main
- name: Create Release
run: (gh release create v${{ steps.package-version.outputs.current-version}} --generate-notes) || true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: "Publish"
uses: JS-DevTools/npm-publish@v1
with:
access: "public"
token: ${{ secrets.NPM_TOKEN }}