Skip to content

Commit 7081b0f

Browse files
committed
edit
1 parent 2216096 commit 7081b0f

File tree

2 files changed

+16
-22
lines changed

2 files changed

+16
-22
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ jobs:
1515
- uses: actions/setup-node@v4
1616
with:
1717
node-version: 18
18-
- run: npm install
19-
- run: npm run build
20-
- uses: SonarSource/sonarqube-scan-action@v4.2.1
18+
- uses: oneteme/automation-scripts/.github/actions/sonar-npm-scan@main
2119
env:
2220
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

.github/workflows/release.yml

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,23 @@ jobs:
44
build:
55
runs-on: ubuntu-latest
66
steps:
7-
- uses: actions/checkout@v4
8-
with:
9-
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
10-
- uses: actions/setup-node@v4
11-
with:
12-
node-version: 18
13-
- run: npm install
14-
- run: npm run build
15-
- uses: SonarSource/sonarqube-scan-action@v4.2.1
16-
env:
17-
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
18-
- run: echo "version=$(node -p 'require("./package.json").version')" >>$GITHUB_OUTPUT
19-
id: npmVer
7+
- uses: actions/checkout@v4
8+
with:
9+
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
10+
- uses: actions/setup-node@v4
11+
with:
12+
node-version: 18
13+
- uses: oneteme/automation-scripts/.github/actions/sonar-npm-scan@main
14+
env:
15+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
16+
- uses: oneteme/automation-scripts/.github/actions/npm-project-version@main
17+
id: prj_ver
2018
outputs:
21-
version: ${{ steps.npmVer.outputs.version }}
19+
version: ${{ steps.prj_ver.outputs.version }}
2220
release:
2321
needs: build
2422
runs-on: ubuntu-latest
2523
steps:
26-
- run: gh release create "$version" --repo="$GITHUB_REPOSITORY" --target="$branch" --title="$version" --generate-notes
27-
env:
28-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29-
branch: "${{ github.ref_name }}"
30-
version: "v${{ needs.build.outputs.version }}"
24+
- uses: oneteme/automation-scripts/.github/actions/create-release-notes@main
25+
with:
26+
version: ${{ needs.build.outputs.version }}

0 commit comments

Comments
 (0)