Skip to content

Commit 3c8ed85

Browse files
fix(git-action): updated workflow
1 parent 7704ae0 commit 3c8ed85

File tree

3 files changed

+54
-92
lines changed

3 files changed

+54
-92
lines changed

.github/workflows/beta.yml

Lines changed: 28 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,6 @@ on:
44
push:
55
branches:
66
- beta
7-
pull_request:
8-
types:
9-
- opened
10-
- reopened
11-
- edited
12-
- synchronize
13-
branches:
14-
- beta
157

168
concurrency:
179
group: ${{ github.workflow }}-${{ github.ref }}
@@ -58,36 +50,9 @@ jobs:
5850
name: vitest-code-coverage-report
5951
path: ./coverage/
6052

61-
sonarcloud:
62-
name: SonarCloud
63-
needs: install
64-
runs-on: ${{ matrix.os }}
65-
66-
strategy:
67-
matrix:
68-
os: [ubuntu-latest]
69-
node: [20]
70-
71-
steps:
72-
- uses: actions/checkout@v4
73-
with:
74-
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
75-
- name: Download vitest code coverage results
76-
uses: actions/download-artifact@v4
77-
with:
78-
name: vitest-code-coverage-report
79-
path: ./coverage/
80-
- name: check
81-
run: cd coverage && find .
82-
- name: SonarCloud Scan
83-
uses: SonarSource/sonarcloud-github-action@master
84-
env:
85-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
86-
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
87-
8853
semantic-version:
8954
name: Semantic Release
90-
needs: sonarcloud
55+
needs: install
9156
runs-on: ${{ matrix.os }}
9257

9358
strategy:
@@ -114,3 +79,30 @@ jobs:
11479
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
11580
run: |
11681
npm run release
82+
83+
sonarcloud:
84+
name: SonarCloud
85+
needs: semantic-version
86+
runs-on: ${{ matrix.os }}
87+
88+
strategy:
89+
matrix:
90+
os: [ubuntu-latest]
91+
node: [20]
92+
93+
steps:
94+
- uses: actions/checkout@v4
95+
with:
96+
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
97+
- name: Download vitest code coverage results
98+
uses: actions/download-artifact@v4
99+
with:
100+
name: vitest-code-coverage-report
101+
path: ./coverage/
102+
- name: check
103+
run: cd coverage && find .
104+
- name: SonarCloud Scan
105+
uses: SonarSource/sonarcloud-github-action@master
106+
env:
107+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
108+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

.github/workflows/main.yml

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -50,32 +50,6 @@ jobs:
5050
name: vitest-code-coverage-report
5151
path: ./coverage/
5252

53-
sonarcloud:
54-
name: SonarCloud
55-
runs-on: ${{ matrix.os }}
56-
57-
strategy:
58-
matrix:
59-
os: [ubuntu-latest]
60-
node: [20]
61-
62-
steps:
63-
- uses: actions/checkout@v4
64-
with:
65-
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
66-
- name: Download vitest code coverage results
67-
uses: actions/download-artifact@v4
68-
with:
69-
name: vitest-code-coverage-report
70-
path: ./coverage/
71-
- name: check
72-
run: cd coverage && find .
73-
- name: SonarCloud Scan
74-
uses: SonarSource/sonarcloud-github-action@master
75-
env:
76-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
77-
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
78-
7953
semantic-version:
8054
name: Semantic Release
8155
needs: install
@@ -106,3 +80,29 @@ jobs:
10680
run: |
10781
npm run release
10882
83+
sonarcloud:
84+
name: SonarCloud
85+
needs: semantic-version
86+
runs-on: ${{ matrix.os }}
87+
88+
strategy:
89+
matrix:
90+
os: [ubuntu-latest]
91+
node: [20]
92+
93+
steps:
94+
- uses: actions/checkout@v4
95+
with:
96+
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
97+
- name: Download vitest code coverage results
98+
uses: actions/download-artifact@v4
99+
with:
100+
name: vitest-code-coverage-report
101+
path: ./coverage/
102+
- name: check
103+
run: cd coverage && find .
104+
- name: SonarCloud Scan
105+
uses: SonarSource/sonarcloud-github-action@master
106+
env:
107+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
108+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

.github/workflows/pull_request.yml

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -82,33 +82,3 @@ jobs:
8282
env:
8383
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
8484
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
85-
86-
semantic-version:
87-
name: Semantic Release
88-
needs: sonarcloud
89-
runs-on: ${{ matrix.os }}
90-
91-
strategy:
92-
matrix:
93-
os: [ubuntu-latest]
94-
node: [20]
95-
96-
steps:
97-
- uses: actions/setup-node@v4
98-
with:
99-
node-version: ${{ matrix.node }}
100-
- name: Checkout Repo
101-
uses: actions/checkout@v4
102-
- name: cache node_modules
103-
uses: actions/cache@v4
104-
id: cache
105-
with:
106-
path: node_modules
107-
key: ${{ matrix.os }}-node-v${{ matrix.node }}-deps-${{ hashFiles(format('{0}{1}', github.workspace, '/package-lock.json')) }}
108-
- name: Versioning
109-
env:
110-
GH_TOKEN: ${{ secrets.GH_TOKEN }}
111-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
112-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
113-
run: |
114-
npm run release

0 commit comments

Comments
 (0)