-
Notifications
You must be signed in to change notification settings - Fork 0
78 lines (67 loc) · 2.44 KB
/
build-main.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
---
name: Build Main
"on":
push:
branches: [main]
env:
# renovate: datasource=npm depName=@semantic-release/changelog
SEMANTIC_RELEASE_CHANGELOG_VERSION: 6.0.3
# renovate: datasource=npm depName=@semantic-release/git
SEMANTIC_RELEASE_GIT_VERSION: 10.0.1
# renovate: datasource=npm depName=conventional-changelog-conventionalcommits
CONVENTIONAL_CHANGELOG_CONVENTIONALCOMMITS_VERSION: 6.1.0
jobs:
lint:
name: Lint
uses: ./.github/workflows/lint.yml
with:
continue-on-error: true
test:
name: Test
uses: ./.github/workflows/test.yml
with:
continue-on-error: true
release:
name: Release
runs-on: ubuntu-latest
concurrency: ${{ github.workflow }}-release
outputs:
release-published: ${{ steps.release.outputs.new_release_published }}
release-version: ${{ steps.release.outputs.new_release_version }}
steps:
- name: Checkout
# yamllint disable-line rule:line-length
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- name: Release
id: release
# yamllint disable-line rule:line-length
uses: cycjimmy/semantic-release-action@b1b432f13acb7768e0c8efdec416d363a57546f2 # v4.1.1
env:
GITHUB_TOKEN: ${{ secrets.SEMANTIC_RELEASE_GITHUB_TOKEN }}
GIT_AUTHOR_NAME: aki-bot[bot]
GIT_AUTHOR_EMAIL: 103840025+aki-bot[bot]@users.noreply.github.com
GIT_COMMITTER_NAME: aki-bot[bot]
GIT_COMMITTER_EMAIL: 103840025+aki-bot[bot]@users.noreply.github.com
with:
# renovate: datasource=npm depName=semantic-release
semantic_version: 21.1.2
extra_plugins:
"@semantic-release/changelog@\
${{ env.SEMANTIC_RELEASE_CHANGELOG_VERSION }} \
@semantic-release/git@\
${{ env.SEMANTIC_RELEASE_GIT_VERSION }} \
conventional-changelog-conventionalcommits@\
${{ env.CONVENTIONAL_CHANGELOG_CONVENTIONALCOMMITS_VERSION }}"
deploy-to-prod:
name: Deploy to prod
needs: release
if: needs.release.outputs.release-published == 'true'
uses: ./.github/workflows/deploy.yml
with:
environment: prod
version: v${{ needs.release.outputs.release-version }}
secrets:
ANSIBLE_SSH_PRIVATE_KEY: ${{ secrets.ANSIBLE_SSH_PRIVATE_KEY }}
ANSIBLE_VAULT_PASSWORD_PROD: ${{ secrets.ANSIBLE_VAULT_PASSWORD_PROD }}