-
Notifications
You must be signed in to change notification settings - Fork 34
27 lines (27 loc) · 894 Bytes
/
release.yml
File metadata and controls
27 lines (27 loc) · 894 Bytes
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
name: release
on: workflow_dispatch
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v3
with:
node-version: 12
registry-url: https://registry.npmjs.org/
- name: checkout
uses: actions/checkout@v3
with:
fetch-depth: 0 # gives standard-version access to all previous commits
- name: generate tag and release body
run: |
git config user.name Fabio Benedetti
git config user.email fabyo82@outlook.com
npx standard-version
- name: publish tag
id: publish_tag
run: |
git push --follow-tags origin main && npm install && npm publish
echo ::set-output name=tag_name::$(git describe HEAD --abbrev=0)
env:
NODE_AUTH_TOKEN: ${{ secrets.npm_token }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}