-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (38 loc) · 1.04 KB
/
build-and-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
38
39
40
41
42
43
44
45
46
# This is a basic workflow to help you get started with Actions
name: Publish package to Github
on:
workflow_dispatch:
push:
branches:
- main
- staging
concurrency:
group: ${{ github.ref }}
jobs:
github-release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Semantic Release
uses: cycjimmy/semantic-release-action@v4
id: semantic
with:
branch: |
[
'main',
{
name: 'staging',
prerelease: true
}
]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Display new tag version
if: steps.semantic.outputs.new_release_published == 'true'
run: |
echo New release: ${{ steps.semantic.outputs.new_release_version }}