Skip to content

Commit 9843b40

Browse files
Automatic update. Managed by Terraform
1 parent c61cdec commit 9843b40

File tree

1 file changed

+3
-54
lines changed

1 file changed

+3
-54
lines changed

.github/workflows/release.yaml

Lines changed: 3 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -7,58 +7,7 @@ on:
77
push:
88
branches:
99
- main
10-
1110
jobs:
12-
check:
13-
name: Check release
14-
runs-on: ubuntu-latest
15-
if: github.event_name == 'pull_request'
16-
steps:
17-
- name: Checkout
18-
uses: actions/checkout@v3
19-
20-
- name: Setup Node.js
21-
uses: actions/setup-node@v3
22-
with:
23-
node-version: 20
24-
25-
- name: Analyze commits
26-
id: next_release_version
27-
run: |
28-
29-
npm install --save-dev semantic-release@18 > /dev/null
30-
sed -i "s#const {isCi, branch, prBranch, isPr} = context.envCi;#const {isCi, branch, prBranch, isPr} = {isCi: false, branch: '${{ github.event.pull_request.head.ref }}', prBranch: undefined, isPr: undefined};#" node_modules/semantic-release/index.js
31-
echo "TAG=$(npx semantic-release -b ${{ github.event.pull_request.head.ref }} -p '@semantic-release/commit-analyzer' --dry-run --no-ci | grep -oiP 'the next release version is *\K.*')" >> $GITHUB_OUTPUT
32-
env:
33-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34-
35-
- name: Create comment if analyze commits fails
36-
uses: peter-evans/create-or-update-comment@v2
37-
if: steps.next_release_version.outputs.TAG == ''
38-
with:
39-
issue-number: ${{ github.event.pull_request.number }}
40-
body: |
41-
Commits message format don't use Angular Commit Message Conventions and it's necessary to generate the next tag
42-
43-
https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#-git-commit-guidelines
44-
45-
- name: Cancel if analyze commits fails
46-
if: steps.next_release_version.outputs.TAG == ''
47-
uses: actions/github-script@v6
48-
with:
49-
script: |
50-
core.setFailed("Commits message format don't use Angular Commit Message Conventions and it's necessary to generate the next tag")
51-
52-
release:
53-
name: Generate release
54-
runs-on: ubuntu-latest
55-
if: github.event_name == 'push'
56-
steps:
57-
- name: Checkout
58-
uses: actions/checkout@v3
59-
60-
- name: Semantic Release
61-
id: release
62-
uses: cycjimmy/semantic-release-action@v3
63-
env:
64-
GITHUB_TOKEN: ${{ secrets.KINGKONG_GITHUB_TOKEN }}
11+
build:
12+
uses: ThingsO2/monom-ci-workflows/.github/workflows/release-workflow.yaml@main
13+
secrets: inherit

0 commit comments

Comments
 (0)