-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (57 loc) · 1.61 KB
/
CICD.yaml
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: CICD
on:
push:
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}
jobs:
semantic:
runs-on: ubuntu-latest
outputs:
new_release: ${{ steps.semantic.outputs.new_release_published }}
version: ${{ steps.semantic.outputs.new_release_version }}
steps:
- name: Check out Git repository
uses: actions/checkout@v4
- name: Semantic Release
uses: cycjimmy/semantic-release-action@v4
id: semantic
release:
runs-on: ${{ matrix.os }}
needs: [semantic]
if: needs.semantic.outputs.new_release == 'true'
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- name: Check out Git repository
uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install Node.js, NPM and Yarn
uses: actions/setup-node@v4
with:
node-version: 20
- name: Publish version
run: |
jq '.version = "${{ needs.semantic.outputs.version }}"' package.json > temp && mv temp package.json
cat package.json
rm -rf node_modules package-lock.json
npm install
npm run package
npm run publish
shell: bash
merge:
runs-on: ubuntu-latest
needs: [release]
if: github.ref == 'refs/heads/master'
steps:
- name: Check out Git repository
uses: actions/checkout@v4
- name: Merge master -> next
uses: devmasx/merge-branch@master
with:
type: now
from_branch: master
target_branch: next
github_token: ${{ secrets.TOKEN }}