Skip to content

Commit 0cb9eb7

Browse files
committed
ci: update ci
1 parent 30f9b12 commit 0cb9eb7

File tree

6 files changed

+103
-4
lines changed

6 files changed

+103
-4
lines changed

.github/workflows/contributors.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ jobs:
1111
steps:
1212
- uses: wow-actions/contributors-list@v1
1313
with:
14-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
14+
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
1515
svgPath: CONTRIBUTORS.svg
1616
round: true

.github/workflows/lighthouse-report.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
uses: patrickedqvist/[email protected]
1616
id: wait-for-vercel
1717
with:
18-
token: ${{ secrets.GITHUB_TOKEN }}
18+
token: ${{ secrets.ACCESS_TOKEN }}
1919
max_timeout: 300
2020
- name: Audit URLs using Lighthouse
2121
id: lighthouse_audit
@@ -32,7 +32,7 @@ jobs:
3232
id: format_lighthouse_score
3333
uses: actions/github-script@v6
3434
with:
35-
github-token: ${{ secrets.GITHUB_TOKEN }}
35+
github-token: ${{ secrets.ACCESS_TOKEN }}
3636
script: |
3737
const result = ${{ steps.lighthouse_audit.outputs.manifest }}[0].summary
3838
const links = ${{ steps.lighthouse_audit.outputs.links }}
@@ -56,7 +56,7 @@ jobs:
5656
id: comment_to_pr
5757
uses: marocchino/[email protected]
5858
with:
59-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
59+
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
6060
number: ${{ github.event.pull_request.number }}
6161
header: lighthouse
6262
message: ${{ steps.format_lighthouse_score.outputs.comment }}

.github/workflows/lint.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Check for lint/build errors
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- '**'
7+
8+
jobs:
9+
lint:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- uses: actions/setup-node@v2
14+
with:
15+
node-version: 16
16+
registry-url: https://registry.npmjs.org/
17+
18+
- name: npm install, lint
19+
run: |
20+
npm install
21+
npm run lint
22+
build:
23+
runs-on: ubuntu-latest
24+
steps:
25+
- uses: actions/checkout@v2
26+
- uses: actions/setup-node@v2
27+
with:
28+
node-version: 16
29+
registry-url: https://registry.npmjs.org/
30+
31+
- name: npm install, build
32+
run: |
33+
npm install
34+
npm run build

.github/workflows/release.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Release to GHR
2+
on:
3+
push:
4+
branches:
5+
- staging
6+
- main
7+
8+
jobs:
9+
release:
10+
name: Release
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v2
15+
16+
- uses: actions/setup-node@v2
17+
with:
18+
node-version: 16
19+
registry-url: https://registry.npmjs.org/
20+
21+
- name: Install dependencies
22+
run: npm install
23+
24+
- name: Build package
25+
run: npm run build
26+
27+
- name: Release
28+
env:
29+
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
30+
run: npx semantic-release

.releaserc.js

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
const mainConfig = {
2+
branches: ['main'],
3+
plugins: [
4+
'@semantic-release/commit-analyzer',
5+
'@semantic-release/release-notes-generator',
6+
'@semantic-release/changelog',
7+
[
8+
'@semantic-release/npm',
9+
{
10+
npmPublish: false,
11+
tarballDir: 'dist'
12+
}
13+
],
14+
[
15+
'@semantic-release/git',
16+
{
17+
assets: [
18+
'package.json',
19+
'package-lock.json',
20+
'CHANGELOG.md'
21+
],
22+
message: 'chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}\n\n\nskip-checks: true'
23+
}
24+
],
25+
[
26+
'@semantic-release/github',
27+
{
28+
assets: 'dist/*.tgz'
29+
}
30+
]
31+
],
32+
repositoryUrl: 'https://github.com/LionCubFrontEnd/docs'
33+
};
34+
35+
module.exports = mainConfig;

CHANGELOG.md

Whitespace-only changes.

0 commit comments

Comments
 (0)