-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (52 loc) · 1.35 KB
/
CICD.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: CI + release
on:
workflow_dispatch:
push:
branches: [ main ]
pull_request:
env:
NODE_VERSION: 20
PYTHON_VERSION: '3.12'
jobs:
pre-commit:
name: 'Execute pre-commit rules'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Run pre-commit rules
uses: pre-commit/[email protected]
workflow-validation:
name: Github Action Workflows validation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: reviewdog/action-actionlint@v1
tag-release:
name: Github release
runs-on: ubuntu-latest
if: ${{ github.ref_name == 'main' }}
needs:
- pre-commit
- workflow-validation
permissions:
contents: write
outputs:
released_version: ${{ steps.release.outputs.version }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
- name: "Semantic release"
id: release
uses: "meero-com/github-actions-shared-workflows/actions/release/semantic@main"
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
npm-token: ${{ secrets.NPM_TOKEN }}
branch: 'main'