Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: move install of semantic release packages into release workflow #1132

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ jobs:
- name: Install dependencies
run: yarn --frozen-lockfile

- name: Install semantic release
run: yarn add -D [email protected] @semantic-release/[email protected] @semantic-release/[email protected]

- name: Semantic release
run: yarn semantic-release
env:
Expand Down
45 changes: 45 additions & 0 deletions .github/workflows/release-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Release test

on:
pull_request:
types:
- opened
- synchronize

permissions:
contents: write

jobs:
release-test:
name: Release test

runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}

- name: Get lts node versions
id: get-lts-versions
run: scripts/get-lts-versions.sh

- name: Use Node.js ${{ steps.get-lts-versions.outputs.last_lts_version }}
uses: actions/setup-node@v4
with:
node-version: ${{ steps.get-lts-versions.outputs.last_lts_version }}
cache: 'yarn'

- name: Install dependencies
run: yarn --frozen-lockfile

- name: Install semantic release
run: yarn add -D [email protected] @semantic-release/[email protected] @semantic-release/[email protected]

- name: Apply debug patches
run: patches/apply-patches.sh
- name: Semantic release dry run
run: GITHUB_ACTIONS="" yarn semantic-release --dry-run --branches ${{ github.event.pull_request.head.ref }}
env:
GITHUB_TOKEN: ${{ github.token }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
3 changes: 3 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ jobs:
- name: Install dependencies
run: yarn --frozen-lockfile

- name: Install semantic release
run: yarn add -D [email protected] @semantic-release/[email protected] @semantic-release/[email protected]

- name: Apply debug patches
run: patches/apply-patches.sh

Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ jobs:

strategy:
matrix:
os: ['macos-latest', 'windows-latest']
os: [
'macos-latest',
# temporarily disabled due to performance issues
# 'windows-latest'
]
node-version: ${{ fromJson(needs.get-lts-versions.outputs.matrix_lts_versions) }}
database: ['no-db']

Expand Down Expand Up @@ -177,10 +181,6 @@ jobs:
if: contains(matrix.bottom-version, 'graphql')
run: yarn -s add graphql@^15.8.0 [email protected] --dev

#NOTE: addresses issue "npm ERR! maxAge must be a number" due picking npm version from local semantic-release
- name: Remove semantic-release
run: yarn -s remove semantic-release

- name: Test
run: yarn -s test:ci
env:
Expand Down
5 changes: 0 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,6 @@
"@prisma-labs/prettier-config": "0.1.0",
"@prisma/client": "^5.0.0",
"@prisma/internals": "^5.0.0",
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/git": "^10.0.1",
"@types/debug": "^4.1.12",
"@types/expand-tilde": "^2.0.2",
"@types/jest": "29.5.14",
Expand Down Expand Up @@ -120,9 +118,6 @@
"yalc": "^1.0.0-pre.53",
"zod": "^3.23.8"
},
"optionalDependencies": {
"semantic-release": "^23.1.1"
},
"prettier": "@prisma-labs/prettier-config",
"peerDependencies": {
"@prisma/client": "^5.0.0",
Expand Down
10 changes: 10 additions & 0 deletions patches/octokit_request_dist_bundle_index.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
--- node_modules/@semantic-release/github/node_modules/@octokit/request/dist-bundle/index.js.original 2024-12-02 22:59:40
+++ node_modules/@semantic-release/github/node_modules/@octokit/request/dist-bundle/index.js 2024-12-02 23:03:06
@@ -70,6 +70,7 @@
}
}
}
+ console.log(error, error.stack);
const requestError = new RequestError(message, 500, {
request: requestOptions
});
12 changes: 0 additions & 12 deletions patches/octokit_request_dist_node_index.patch

This file was deleted.

Loading
Loading