-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (36 loc) · 1.16 KB
/
release.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
on:
workflow_run:
workflows: [validate]
branches: [main]
types:
- completed
name: Release
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "lts/*"
- name: Prepare prerelease semantic
if: github.ref == 'refs/heads/main'
run: mv .releaserc.prerelease.yaml .releaserc.yaml
- name: Semantic Release
uses: cycjimmy/semantic-release-action@v2
id: semantic # Need an `id` for output variables
with:
semantic_version: 17
extra_plugins: |
@semantic-release/changelog@5
@semantic-release/exec@5
@semantic-release/git@9
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Do something when a new release published
if: steps.semantic.outputs.new_release_published == 'true'
run: |
echo ${{ steps.semantic.outputs.new_release_version }}
echo ${{ steps.semantic.outputs.new_release_major_version }}
echo ${{ steps.semantic.outputs.new_release_minor_version }}
echo ${{ steps.semantic.outputs.new_release_patch_version }}