Skip to content

Commit 081f834

Browse files
authored
ci: use-latest-yarn (#509)
<!--🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅 You can expedite processing of your PR by using this template to provide context and additional information. Before actually opening a PR please make sure that it does NOT fall into any of the following categories 🚫 Spam PRs (accidental or intentional) - these will result in a 30-days or even ∞ ban from interacting with the project depending on reoccurrence and severity. 🚫 Lazy typo fixing PRs - if you fix a typo in a file, your PR will only be merged if all other typos in the same file are also fixed with the same PR 🚫 If you fail to provide any _Description_ below, your PR will be considered spam. If you do not check the _Affirmation_ box below, your PR will not be merged. 🚫 If you do not check one of the _AI Tool Disclosure_ boxes below, your PR will not be merged. If you used AI tools to assist you in writing code, but fail to provide the required disclosure, your PR will not be merged. 🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅--> ### Description <!-- ✍️--> A clear and concise summary of the change and which issue (if any) it fixes. Should also include relevant motivation and context. Resolves or fixes issue: <!-- ✍️ Add GitHub issue number in format `#0000` or `none` --> ### AI Tool Disclosure - [x] My contribution does not include any AI-generated content - [ ] My contribution includes AI-generated content, as disclosed below: - AI Tools: `[e.g. GitHub CoPilot, ChatGPT, JetBrains Junie etc.]` - LLMs and versions: `[e.g. GPT-4.1, Claude Haiku 4.5, Gemini 2.5 Pro etc.]` - Prompts: `[Summarize the key prompts or instructions given to the AI tools]` ### Affirmation - [x] My code follows the [CONTRIBUTING.md](https://github.com/CycloneDX/cyclonedx-node-yarn/blob/main/CONTRIBUTING.md) guidelines --------- Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
1 parent cac9ee8 commit 081f834

2 files changed

Lines changed: 47 additions & 11 deletions

File tree

.github/workflows/nodejs.yml

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,11 @@ jobs:
4343
package-manager-cache: false
4444
# cache: 'yarn'
4545
- name: Setup yarn
46-
run: corepack enable yarn
46+
run: |
47+
npm uninstall -g yarn
48+
corepack enable yarn
49+
corepack prepare --activate yarn@4
50+
yarn -v
4751
- name: Setup subject
4852
run: yarn install --immutable
4953
- name: build
@@ -86,7 +90,11 @@ jobs:
8690
package-manager-cache: false
8791
# cache: 'yarn'
8892
- name: Setup yarn
89-
run: corepack enable yarn
93+
run: |
94+
npm uninstall -g yarn
95+
corepack enable yarn
96+
corepack prepare --activate yarn@4
97+
yarn -v
9098
- name: Setup subject
9199
run: yarn install --immutable
92100
- name: build
@@ -128,7 +136,11 @@ jobs:
128136
package-manager-cache: false
129137
# cache: 'yarn'
130138
- name: Setup yarn
131-
run: corepack enable yarn
139+
run: |
140+
npm uninstall -g yarn
141+
corepack enable yarn
142+
corepack prepare --activate yarn@4
143+
yarn -v
132144
- name: Setup subject
133145
run: yarn install --immutable
134146
- name: build
@@ -153,7 +165,11 @@ jobs:
153165
package-manager-cache: false
154166
# cache: 'yarn'
155167
- name: Setup yarn
156-
run: corepack enable yarn
168+
run: |
169+
npm uninstall -g yarn
170+
corepack enable yarn
171+
corepack prepare --activate yarn@4
172+
yarn -v
157173
- name: Setup subject
158174
run: yarn install --immutable
159175
- name: build
@@ -221,7 +237,11 @@ jobs:
221237
package-manager-cache: false
222238
# cache: 'yarn'
223239
- name: Setup yarn
224-
run: corepack enable yarn
240+
run: |
241+
npm uninstall -g yarn
242+
corepack enable yarn
243+
corepack prepare --activate yarn@4
244+
yarn -v
225245
- name: Setup subject
226246
run: yarn install --immutable
227247
- name: setup-tests
@@ -288,8 +308,10 @@ jobs:
288308
# cache: 'yarn'
289309
- name: Setup yarn ${{ env.YARN_VERSION }}
290310
run: |
311+
npm uninstall -g yarn
291312
corepack enable yarn
292313
yarn set version "$YARN_VERSION"
314+
yarn -v
293315
- name: Setup subject
294316
run: yarn install --no-immutable # we might be changing yarn version for tests -- require to ignore lock
295317
- name: fetch build artifact

.github/workflows/release.yml

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,11 @@ jobs:
6262
package-manager-cache: false
6363
# cache: 'yarn'
6464
- name: Setup yarn
65-
run: corepack enable yarn
66-
- name: Setup yarn
67-
run: yarn
65+
run: |
66+
npm uninstall -g yarn
67+
corepack enable yarn
68+
corepack prepare --activate yarn@4
69+
yarn -v
6870
- name: bump VERSION
6971
id: bump
7072
# `npm version` seams superior to `yarn version` ...
@@ -111,7 +113,11 @@ jobs:
111113
package-manager-cache: false
112114
# cache: 'yarn'
113115
- name: Setup yarn
114-
run: corepack enable yarn
116+
run: |
117+
npm uninstall -g yarn
118+
corepack enable yarn
119+
corepack prepare --activate yarn@4
120+
yarn -v
115121
- name: Setup subject
116122
run: yarn install --immutable
117123
- name: build
@@ -177,7 +183,11 @@ jobs:
177183
node-version: ${{ env.NODE_ACTIVE_LTS }}
178184
package-manager-cache: false
179185
- name: Setup yarn
180-
run: corepack enable yarn
186+
run: |
187+
npm uninstall -g yarn
188+
corepack enable yarn
189+
corepack prepare --activate yarn@4
190+
yarn -v
181191
- name: Setup subject
182192
run: yarn install --immutable
183193
- name: setup-tests
@@ -217,7 +227,11 @@ jobs:
217227
node-version: ${{ env.NODE_ACTIVE_LTS }}
218228
package-manager-cache: false
219229
- name: Setup yarn
220-
run: corepack enable yarn
230+
run: |
231+
npm uninstall -g yarn
232+
corepack enable yarn
233+
corepack prepare --activate yarn@4
234+
yarn -v
221235
- name: yarn install
222236
run: yarn install --no-immutable
223237
- name: publish to registry as "${{ env.NPMJS_RELEASE_TAG }}"

0 commit comments

Comments
 (0)