-
Notifications
You must be signed in to change notification settings - Fork 6
63 lines (60 loc) · 1.46 KB
/
ci.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
61
62
63
name: ci
on:
pull_request:
branches:
- "main"
push:
branches:
- "main"
env:
TEST_TAG: user/create-subtraction:test
jobs:
commitlint:
runs-on: ubuntu-22.04
if: github.event_name == 'pull_request'
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Commitlint
uses: wagoid/commitlint-github-action@v6
build:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build
run: docker build --target base .
test:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build
id: build-push
uses: docker/build-push-action@v5
with:
context: .
load: true
tags: ${{ env.TEST_TAG }}
target: test
- name: Test
run: docker run ${{ env.TEST_TAG }}
release:
runs-on: ubuntu-22.04
if: github.event_name == 'push'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup NodeJS
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install semantic-release
run: npm i semantic-release@v23.0.0 conventional-changelog-conventionalcommits@8.0.0
- name: Release
env:
GITHUB_USERNAME: ${{ secrets.GH_USERNAME }}
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
run: npx semantic-release