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

Commit 746f1d2

Browse files
authored
fix(ci): release broken release process
Release-As: 6.0.0
2 parents 749a6d3 + 5c9d4de commit 746f1d2

22 files changed

+3879
-5453
lines changed

.github/workflows/ci.yml

Lines changed: 33 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ jobs:
1414
uses: actions/checkout@v4
1515

1616
- name: setup pnpm
17-
uses: pnpm/action-setup@v2
17+
uses: pnpm/action-setup@v3
1818
with:
19-
version: 8
19+
version: 9
2020

2121
- name: setup node.js
2222
uses: actions/setup-node@v4
@@ -27,6 +27,9 @@ jobs:
2727
- name: install dependencies
2828
run: pnpm install
2929

30+
- name: check for lint and format errors
31+
run: pnpm run biome:ci
32+
3033
- name: build typescript
3134
run: pnpm run build --noEmit
3235

@@ -62,9 +65,35 @@ jobs:
6265
uses: actions/checkout@v4
6366

6467
- name: setup pnpm
65-
uses: pnpm/action-setup@v2
68+
uses: pnpm/action-setup@v3
69+
with:
70+
version: 9
71+
72+
- name: setup node.js
73+
uses: actions/setup-node@v4
74+
with:
75+
node-version: 20
76+
cache: 'pnpm'
77+
78+
- name: install dependencies
79+
run: pnpm install
80+
81+
- name: run tests
82+
run: pnpm run test
83+
84+
coverage:
85+
name: "Test Coverage"
86+
runs-on: "ubuntu-latest"
87+
needs: [tests]
88+
if: ${{ github.event_name == 'push' }} # Publish coverage only for push commits, not PRs.
89+
steps:
90+
- name: checkout code
91+
uses: actions/checkout@v4
92+
93+
- name: setup pnpm
94+
uses: pnpm/action-setup@v3
6695
with:
67-
version: 8
96+
version: 9
6897

6998
- name: setup node.js
7099
uses: actions/setup-node@v4
@@ -79,7 +108,6 @@ jobs:
79108
run: pnpm run coverage
80109

81110
- name: publish code coverage to code-climate (duh)
82-
if: ${{ github.event_name == 'push' && matrix.os.index == 1 }} # Push coverage only once inside the matrix.
83111
uses: paambaati/[email protected]
84112
env:
85113
CC_TEST_REPORTER_ID: 3470adaf12ff7cecdfe5a968ae0e95d098b6ee58c340114e1e90d440ee9e66ab

.github/workflows/publish.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ on:
55
- published
66
- created
77
- released
8-
- rerequested
98

109
jobs:
1110
publish:
@@ -21,7 +20,7 @@ jobs:
2120
CREATE_MAJOR_VERSION_TAG: true
2221
CREATE_MINOR_VERSION_TAG: true
2322
CREATE_PATCH_VERSION_TAG: true
24-
CLEAN_TARGETS: '.[!.]*,test,src,*.ts,*.json,CHANGELOG.md,_config.yml,.github,coverage,.nyc_output'
23+
CLEAN_TARGETS: '.[!.]*,test,src,*.ts,*.json,CHANGELOG.md,_config.yml,.github,.tap'
2524
BRANCH_NAME: 'releases/${MAJOR}/${MINOR}/${PATCH}'
2625
env:
2726
DEBUG: '*'

.github/workflows/release.yml

Lines changed: 9 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -6,102 +6,23 @@ on:
66
tags:
77
- '!*'
88

9-
jobs:
10-
next-version:
11-
name: Get next release version
12-
runs-on: ubuntu-latest
13-
outputs:
14-
need-release: ${{ steps.need-release.outputs.result }}
15-
steps:
16-
- name: checkout code
17-
uses: actions/checkout@v4
18-
with:
19-
fetch-depth: 0
20-
21-
- name: setup pnpm
22-
uses: pnpm/action-setup@v2
23-
with:
24-
version: 8
25-
26-
- name: setup node.js
27-
uses: actions/setup-node@v4
28-
with:
29-
node-version: 20
30-
cache: 'pnpm'
31-
32-
- name: install dependencies
33-
run: pnpm install
34-
35-
- name: install workflow script dependencies
36-
run: pnpm add [email protected]
37-
38-
- name: find current latest release version
39-
uses: pozetroninc/github-action-get-latest-release@master
40-
id: last-release
41-
with:
42-
repository: ${{ github.repository }}
43-
token: ${{ secrets.CUSTOM_GITHUB_PERSONAL_TOKEN }}
44-
45-
- name: find next release version
46-
id: next-release
47-
run: pnpm -s dlx semantic-release --dry-run
48-
env:
49-
GITHUB_TOKEN: ${{ secrets.CUSTOM_GITHUB_PERSONAL_TOKEN }}
50-
51-
- name: print discovered versions
52-
run: |
53-
echo "Last release version = ${{ steps.last-release.outputs.release }}"
54-
echo "Next release version = ${{ steps.next-release.outputs.new-release-version }}"
55-
56-
- name: check if we need a new release
57-
uses: actions/github-script@v6
58-
id: need-release
59-
env:
60-
LAST_RELEASE: ${{ steps.last-release.outputs.release }}
61-
NEW_RELEASE: ${{ steps.next-release.outputs.new-release-version }}
62-
with:
63-
script: |
64-
const semver = require('semver');
65-
66-
const lastRelease = process.env.LAST_RELEASE.replace(/^v/, '');
67-
const newRelease = process.env.NEW_RELEASE.replace(/^v/, '');
68-
return semver.gt(newRelease, lastRelease);
69-
result-encoding: string
70-
71-
- name: print if we need a new release
72-
run: |
73-
echo "Need a new release = ${{ steps.need-release.outputs.result }}"
9+
permissions:
10+
contents: write
11+
pull-requests: write
7412

13+
jobs:
7514
release:
7615
name: Cut a release on GitHub
7716
runs-on: ubuntu-latest
78-
needs: next-version
79-
if: needs.next-version.outputs.need-release == 'true'
8017
steps:
8118
- name: checkout code
8219
uses: actions/checkout@v4
8320
with:
8421
fetch-depth: 0
8522

86-
- name: setup pnpm
87-
uses: pnpm/action-setup@v2
88-
with:
89-
version: 8
90-
91-
- name: setup node.js
92-
uses: actions/setup-node@v4
23+
- name: make a new release PR
24+
uses: google-github-actions/release-please-action@v4
25+
id: release
9326
with:
94-
node-version: 20
95-
cache: 'pnpm'
96-
97-
- name: install dependencies
98-
run: pnpm install
99-
100-
- name: make a release on GitHub
101-
run: pnpm -s dlx semantic-release
102-
env:
103-
GITHUB_TOKEN: ${{ secrets.CUSTOM_GITHUB_PERSONAL_TOKEN }}
104-
GIT_AUTHOR_NAME: 'GP'
105-
GIT_COMMITTER_NAME: 'GP'
106-
GIT_AUTHOR_EMAIL: '[email protected]'
107-
GIT_COMMITTER_EMAIL: '[email protected]'
27+
token: ${{ secrets.CUSTOM_GITHUB_PERSONAL_TOKEN }}
28+
config-file: .release-please-config.json

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
registry = "https://registry.npmjs.org/"
22
save-exact = true
33
fund = false
4+
package-manager-strict = false

.nycrc.json

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

.prettierrc.json

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

.release-please-config.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
3+
"packages": {
4+
".": {
5+
"release-type": "node",
6+
"include-v-in-tag": true,
7+
"include-component-in-tag": false
8+
}
9+
}
10+
}

.release-please-manifest.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
".": "5.0.0"
3+
}

.releaserc.json

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

0 commit comments

Comments
 (0)