Skip to content
This repository was archived by the owner on Jul 23, 2025. It is now read-only.

Commit f04aa29

Browse files
authored
Merge pull request #625 from paambaati/gp/redesign-workflows
2 parents ec787bf + 920dae4 commit f04aa29

File tree

9 files changed

+13885
-3273
lines changed

9 files changed

+13885
-3273
lines changed

.github/dependabot.yml

Lines changed: 10 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -3,59 +3,17 @@ updates:
33
- package-ecosystem: npm
44
directory: "/"
55
schedule:
6-
interval: daily
7-
time: "23:30"
8-
open-pull-requests-limit: 10
6+
interval: monthly
7+
open-pull-requests-limit: 5
98
ignore:
10-
- dependency-name: nock
9+
# Ignore ESM-only package versions.
10+
# This can be fully removed once everything is ESM-native without all the weird issues.
11+
- dependency-name: hook-std
1112
versions:
12-
- 13.0.10
13-
- 13.0.6
14-
- 13.0.7
15-
- 13.0.8
16-
- 13.0.9
17-
- dependency-name: typescript
13+
- '3.x'
14+
- dependency-name: node-fetch
1815
versions:
19-
- 4.1.4
20-
- 4.1.5
21-
- 4.2.2
22-
- 4.2.3
23-
- dependency-name: tape
16+
- '3.x'
17+
- dependency-name: to-readable-stream
2418
versions:
25-
- 5.1.1
26-
- 5.2.0
27-
- 5.2.1
28-
- dependency-name: "@types/node"
29-
versions:
30-
- 14.14.22
31-
- 14.14.23
32-
- 14.14.25
33-
- 14.14.26
34-
- 14.14.27
35-
- 14.14.28
36-
- 14.14.29
37-
- 14.14.31
38-
- 14.14.32
39-
- 14.14.33
40-
- 14.14.34
41-
- 14.14.35
42-
- 14.14.36
43-
- 14.14.37
44-
- 14.14.39
45-
- 14.14.41
46-
- 15.0.0
47-
- dependency-name: sinon
48-
versions:
49-
- 10.0.0
50-
- 9.2.4
51-
- dependency-name: "@types/node-fetch"
52-
versions:
53-
- 2.5.8
54-
- 2.5.9
55-
- dependency-name: "@types/sinon"
56-
versions:
57-
- 9.0.10
58-
- 9.0.11
59-
- dependency-name: y18n
60-
versions:
61-
- 4.0.1
19+
- '3.x'

.github/workflows/ci.yml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,28 @@
1-
name: "PR Checks"
1+
name: "PR checks"
22
on: [pull_request, push]
33

44
jobs:
55
check_pr:
6+
name: "PR checks"
67
runs-on: ubuntu-latest
78
steps:
89
- name: checkout code
910
uses: actions/checkout@v3
1011

12+
- name: setup node.js
13+
uses: actions/setup-node@v3
14+
with:
15+
node-version: 16
16+
cache: 'npm'
17+
1118
- name: install dependencies
1219
run: npm ci
1320

21+
- name: check lock file for untrusted packages
22+
run: npm_config_yes=true npx lockfile-lint --path package-lock.json --allowed-hosts npm --validate-https
23+
1424
- name: build typescript
15-
run: npm run build
25+
run: npm run build -- --noEmit
1626

1727
- name: run tests and instrument coverage
1828
run: npm run coverage
@@ -33,9 +43,9 @@ jobs:
3343
&& exit 1)
3444
3545
- name: publish code coverage to code-climate (duh)
36-
uses: paambaati/[email protected]
46+
if: ${{ github.event_name == 'push' }}
47+
uses: paambaati/[email protected]
3748
env:
3849
CC_TEST_REPORTER_ID: 3470adaf12ff7cecdfe5a968ae0e95d098b6ee58c340114e1e90d440ee9e66ab
3950
with:
4051
debug: true
41-
if: ${{ github.event_name == 'push' }}

.github/workflows/publish.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: "Publish"
2+
on:
3+
release:
4+
types:
5+
- published
6+
- created
7+
- released
8+
- rerequested
9+
10+
jobs:
11+
publish:
12+
name: Publish released Action to GitHub marketplace
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Publish action
16+
uses: technote-space/release-github-actions@v7
17+
with:
18+
GITHUB_TOKEN: ${{ secrets.CUSTOM_GITHUB_PERSONAL_TOKEN }}
19+
COMMIT_NAME: 'GP'
20+
COMMIT_EMAIL: '[email protected]'
21+
CREATE_MAJOR_VERSION_TAG: true
22+
CREATE_MINOR_VERSION_TAG: true
23+
CREATE_PATCH_VERSION_TAG: true
24+
CLEAN_TARGETS: '.[!.]*,test,src,*.ts,*.json,CHANGELOG.md,_config.yml,.github,coverage,.nyc_output'
25+
BRANCH_NAME: 'releases/${MAJOR}/${MINOR}/${PATCH}'
26+
env:
27+
DEBUG: '*'

.github/workflows/release-branch.yml

Lines changed: 0 additions & 15 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,33 @@
1-
name: "Publish"
1+
name: "Release"
22
on:
3-
create:
3+
push:
44
branches:
5-
- master
5+
- main
6+
tags:
7+
- '!*'
68

79
jobs:
810
release:
9-
name: Publish GitHub Actions to Marketplace
11+
name: Cut a release on GitHub
1012
runs-on: ubuntu-latest
1113
steps:
12-
- name: Publish GitHub Actions to Marketplace
13-
uses: technote-space/release-github-actions@v7
14+
- name: checkout code
15+
uses: actions/checkout@v3
16+
17+
- name: setup node.js
18+
uses: actions/setup-node@v3
1419
with:
15-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
16-
COMMIT_NAME: 'GP'
17-
COMMIT_EMAIL: '[email protected]'
18-
CREATE_MAJOR_VERSION_TAG: false
19-
CREATE_MINOR_VERSION_TAG: false
20-
CLEAN_TARGETS: '.[!.]*,test,src,*.ts,*.json,CHANGELOG.md,_config.yml'
20+
node-version: 16
21+
cache: 'npm'
22+
23+
- name: install dependencies
24+
run: npm ci
25+
26+
- name: make a release on GitHub
27+
run: npm_config_yes=true npx semantic-release
28+
env:
29+
GITHUB_TOKEN: ${{ secrets.CUSTOM_GITHUB_PERSONAL_TOKEN }}
30+
GIT_AUTHOR_NAME: 'GP'
31+
GIT_COMMITTER_NAME: 'GP'
32+
GIT_AUTHOR_EMAIL: '[email protected]'
33+
GIT_COMMITTER_EMAIL: '[email protected]'

.npmrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
registry = "https://registry.npmjs.org/"
2+
save-exact = true
3+
fund = false

.releaserc.json

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
{
2+
"branches": [
3+
"main"
4+
],
5+
"plugins": [
6+
"@semantic-release/commit-analyzer",
7+
[
8+
"@google/semantic-release-replace-plugin",
9+
{
10+
"replacements": [
11+
{
12+
"files": [
13+
"README.md"
14+
],
15+
"from": "paambaati/[email protected].*",
16+
"to": "paambaati/codeclimate-action@v${nextRelease.version}",
17+
"results": [
18+
{
19+
"file": "README.md",
20+
"hasChanged": true,
21+
"numMatches": 5,
22+
"numReplacements": 5
23+
}
24+
],
25+
"countMatches": true
26+
}
27+
]
28+
}
29+
],
30+
"@semantic-release/release-notes-generator",
31+
[
32+
"@semantic-release/changelog",
33+
{
34+
"changelogFile": "CHANGELOG.md"
35+
}
36+
],
37+
"@semantic-release/npm",
38+
[
39+
"@semantic-release/git",
40+
{
41+
"assets": [
42+
"package.json",
43+
"package-lock.json",
44+
"CHANGELOG.md",
45+
"README.md"
46+
],
47+
"message": "chore(release): ${nextRelease.version}\n\n${nextRelease.notes}"
48+
}
49+
],
50+
"@semantic-release/github"
51+
]
52+
}

0 commit comments

Comments
 (0)