Skip to content

Commit 25ec53b

Browse files
authored
Merge pull request #148 from sercheo87/release
PNPM
2 parents 3962bbc + 111febb commit 25ec53b

File tree

8 files changed

+3264
-7465
lines changed

8 files changed

+3264
-7465
lines changed

.github/workflows/npm-build.yml

Lines changed: 28 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,33 @@
11
name: Node.js Build
22

33
on:
4-
push:
5-
branches:
6-
- master
7-
- feature-ci
8-
pull_request:
9-
branches:
10-
- master
11-
- feature-ci
12-
page_build:
13-
release:
14-
types:
15-
- created
4+
push:
5+
branches:
6+
- master
7+
- feature-ci
8+
pull_request:
9+
branches:
10+
- master
11+
- feature-ci
12+
page_build:
13+
release:
14+
types:
15+
- created
1616

1717
jobs:
18-
build:
19-
runs-on: ubuntu-latest
20-
steps:
21-
- uses: actions/checkout@v2
22-
- uses: actions/setup-node@v2
23-
with:
24-
node-version: 14
25-
- run: npm install
26-
- run: npm run lint
27-
- run: npm run test
28-
- name: Setup sonarqube
29-
uses: warchant/setup-sonar-scanner@v3
30-
- name: Run sonarqube
31-
env:
32-
GITHUB_TOKEN: ${{ secrets.GIT_TOKEN }}
33-
run: sonar-scanner
34-
-Dsonar.sources=.
35-
-Dsonar.exclusions=node_modules/**,sonar-scanner-3.3.0.1492-linux/**
36-
-Dsonar.login=${{ secrets.SONAR_TOKEN }}
37-
-Dsonar.host.url=https://sonarcloud.io
38-
-Dsonar.projectKey=convert-postman-jmeter
18+
build:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v3
22+
- uses: actions/setup-node@v2
23+
with:
24+
node-version: 20
25+
- run: npm install
26+
- run: npm run lint
27+
- run: npm run test
28+
- name: SonarCloud Scan
29+
uses: SonarSource/sonarcloud-github-action@master
30+
env:
31+
GITHUB_TOKEN: ${{ secrets.GIT_TOKEN }} # Needed to get PR information, if any
32+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
33+

.github/workflows/npm-publish.yml

Lines changed: 35 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,41 @@
11
name: Node.js Publish
22

33
on:
4-
push:
5-
branches:
6-
- 'release/**'
7-
page_build:
8-
release:
9-
types:
10-
- published
4+
push:
5+
branches:
6+
- 'release/**'
7+
page_build:
8+
release:
9+
types:
10+
- published
1111

1212
jobs:
13-
build:
14-
runs-on: ubuntu-latest
15-
steps:
16-
- uses: actions/checkout@v2
17-
- uses: actions/setup-node@v2
18-
with:
19-
node-version: 14
20-
- run: npm install
21-
- run: npm run lint
22-
- run: npm run test
23-
- name: Setup sonarqube
24-
uses: warchant/setup-sonar-scanner@v3
25-
- name: Run sonarqube
26-
env:
27-
GITHUB_TOKEN: ${{ secrets.GIT_TOKEN }}
28-
run: sonar-scanner
29-
-Dsonar.sources=.
30-
-Dsonar.exclusions=node_modules/**,sonar-scanner-3.3.0.1492-linux/**
31-
-Dsonar.login=${{ secrets.SONAR_TOKEN }}
32-
-Dsonar.host.url=https://sonarcloud.io
33-
-Dsonar.projectKey=convert-postman-jmeter
13+
build:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v3
17+
- uses: actions/setup-node@v2
18+
with:
19+
node-version: 20
20+
- run: npm install
21+
- run: npm run lint
22+
- run: npm run test
23+
- name: SonarCloud Scan
24+
uses: SonarSource/sonarcloud-github-action@master
25+
env:
26+
GITHUB_TOKEN: ${{ secrets.GIT_TOKEN }} # Needed to get PR information, if any
27+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
3428

35-
publish-npm:
36-
needs: build
37-
runs-on: ubuntu-latest
38-
steps:
39-
- uses: actions/checkout@v2
40-
- uses: actions/setup-node@v2
41-
with:
42-
node-version: 14
43-
registry-url: https://registry.npmjs.org/
44-
- run: npm install
45-
- run: npm publish --access public
46-
env:
47-
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
29+
publish-npm:
30+
needs: build
31+
runs-on: ubuntu-latest
32+
steps:
33+
- uses: actions/checkout@v2
34+
- uses: actions/setup-node@v2
35+
with:
36+
node-version: 20
37+
registry-url: https://registry.npmjs.org/
38+
- run: npm install
39+
- run: npm publish --access public
40+
env:
41+
NODE_AUTH_TOKEN: ${{secrets.npm_token}}

.github/workflows/npm-release.yml

Lines changed: 37 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,42 @@
11
name: Node.js Release
22

33
on:
4-
push:
5-
tags:
6-
- 'v*'
4+
push:
5+
tags:
6+
- 'v*'
77

88
jobs:
9-
build:
10-
runs-on: ubuntu-latest
11-
steps:
12-
- uses: actions/checkout@v2
13-
- uses: actions/setup-node@v2
14-
with:
15-
node-version: 14
16-
- run: npm install
17-
- run: npm run lint
18-
- run: npm run test
19-
- name: Setup sonarqube
20-
uses: warchant/setup-sonar-scanner@v3
21-
- name: Run sonarqube
22-
env:
23-
GITHUB_TOKEN: ${{ secrets.GIT_TOKEN }}
24-
run: sonar-scanner
25-
-Dsonar.sources=.
26-
-Dsonar.exclusions=node_modules/**,sonar-scanner-3.3.0.1492-linux/**
27-
-Dsonar.login=${{ secrets.SONAR_TOKEN }}
28-
-Dsonar.host.url=https://sonarcloud.io
29-
-Dsonar.projectKey=convert-postman-jmeter
30-
- name: Changelog
31-
uses: scottbrenner/generate-changelog-action@master
32-
id: Changelog
33-
- name: Create Release
34-
id: create_release
35-
uses: actions/create-release@v1
36-
env:
37-
GITHUB_TOKEN: ${{ secrets.GIT_TOKEN }}
38-
with:
39-
tag_name: ${{ github.ref }}
40-
release_name: Release ${{ github.ref }}
41-
body: |
42-
# Change Log
43-
44-
## ${{ github.ref }} (May 27, 2019)
45-
46-
- Automatic generation release.
47-
draft: false
48-
prerelease: false
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v3
13+
- uses: actions/setup-node@v2
14+
with:
15+
node-version: 20
16+
- run: npm install
17+
- run: npm run lint
18+
- run: npm run test
19+
- name: SonarCloud Scan
20+
uses: SonarSource/sonarcloud-github-action@master
21+
env:
22+
GITHUB_TOKEN: ${{ secrets.GIT_TOKEN }} # Needed to get PR information, if any
23+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
24+
- name: Changelog
25+
uses: scottbrenner/generate-changelog-action@master
26+
id: Changelog
27+
- name: Create Release
28+
id: create_release
29+
uses: actions/create-release@v1
30+
env:
31+
GITHUB_TOKEN: ${{ secrets.GIT_TOKEN }}
32+
with:
33+
tag_name: ${{ github.ref }}
34+
release_name: Release ${{ github.ref }}
35+
body: |
36+
# Change Log
37+
38+
## ${{ github.ref }} (May 27, 2019)
39+
40+
- Automatic generation release.
41+
draft: false
42+
prerelease: false
Lines changed: 46 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,52 @@
11
name: "Node.js Update changelog"
22

33
on:
4-
push:
5-
branches:
6-
- 'master'
4+
push:
5+
branches:
6+
- 'master'
77

88
jobs:
9-
update-changelog:
10-
runs-on: ubuntu-latest
11-
steps:
12-
- uses: actions/checkout@v2
13-
- uses: actions/setup-node@v2
14-
with:
15-
node-version: 14
16-
- run: npm install
17-
- name: Update changelog
18-
run: |
19-
export GREN_GITHUB_TOKEN=${{ secrets.GIT_TOKEN }}
20-
./node_modules/.bin/gren changelog --override
21-
- name: Get base branch
22-
id: vars
23-
run: |
24-
base_ref=${{ github.head_ref || github.ref }}
25-
echo ::set-output name=base_branch::${base_ref#refs/*/}
26-
- name: Create Pull Request
27-
id: cpr
28-
uses: peter-evans/create-pull-request@v3
29-
with:
30-
committer: GitHub <[email protected]>
31-
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
32-
signoff: false
33-
token: ${{ secrets.GIT_TOKEN }}
34-
commit-message: Update changelog
35-
delete-branch: true
36-
title: Update Changelog
37-
body: |
38-
- Updated with *today's* date
39-
- Auto-generated by [create-pull-request][1]
40-
- Update changelog to reflect release changes
9+
update-changelog:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- uses: actions/setup-node@v2
14+
with:
15+
node-version: 20
16+
- run: npm install
17+
- name: Update changelog
18+
run: |
19+
export GREN_GITHUB_TOKEN=${{ secrets.GIT_TOKEN }}
20+
./node_modules/.bin/gren changelog --override
21+
- name: Get base branch
22+
id: vars
23+
run: |
24+
base_ref=${{ github.head_ref || github.ref }}
25+
echo ::set-output name=base_branch::${base_ref#refs/*/}
26+
- name: Create Pull Request
27+
id: cpr
28+
uses: peter-evans/create-pull-request@v3
29+
with:
30+
committer: GitHub <[email protected]>
31+
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
32+
signoff: false
33+
token: ${{ secrets.GIT_TOKEN }}
34+
commit-message: Update changelog
35+
delete-branch: true
36+
title: Update Changelog
37+
body: |
38+
- Updated with *today's* date
39+
- Auto-generated by [create-pull-request][1]
40+
- Update changelog to reflect release changes
41+
42+
[1]: https://github.com/sercheo87/convert-postman-jmeter
43+
branch: update-changelog
44+
base: master
45+
labels: automated pr
46+
assignees: sercheo87
47+
draft: false
4148

42-
[1]: https://github.com/sercheo87/convert-postman-jmeter
43-
branch: update-changelog
44-
base: master
45-
labels: automated pr
46-
assignees: sercheo87
47-
draft: false
48-
49-
- name: Check outputs
50-
run: |
51-
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
52-
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"
49+
- name: Check outputs
50+
run: |
51+
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
52+
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"

0 commit comments

Comments
 (0)