Skip to content

Commit 2190725

Browse files
authored
Upgrades to Yarn 4.1.1 (#1190)
1 parent 22296e2 commit 2190725

File tree

12 files changed

+17997
-13137
lines changed

12 files changed

+17997
-13137
lines changed

.github/workflows/chromatic.yml

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# .github/workflows/chromatic.yml
22

33
# Workflow name
4-
name: 'Chromatic build on main'
4+
name: "Chromatic build on main"
55

66
# Event for the workflow
77
on:
@@ -14,16 +14,23 @@ jobs:
1414
chromatic-deployment:
1515
runs-on: ubuntu-latest
1616
steps:
17-
- uses: actions/checkout@v2
18-
with:
19-
fetch-depth: 0 # 👈 Required to retrieve git history
20-
- uses: actions/setup-node@v3
17+
- name: Checkout branch
18+
uses: actions/checkout@v3
19+
20+
- name: Setup Node
21+
uses: actions/setup-node@v3
2122
with:
22-
node-version-file: '.node-version'
23-
- run: |
24-
npm config set "@fortawesome:registry" https://npm.fontawesome.com/
25-
npm config set "//npm.fontawesome.com/:_authToken" ${{ secrets.FONTAWESOME_NPM_AUTH_TOKEN }}
26-
- run: yarn
23+
node-version-file: ".node-version"
24+
25+
- name: Setup Yarn
26+
uses: volta-cli/action@v4
27+
28+
- name: Setup env
29+
run: echo "FONTAWESOME_NPM_AUTH_TOKEN=${{ secrets.FONTAWESOME_NPM_AUTH_TOKEN }}" > .env
30+
31+
- name: Install dependencies
32+
run: yarn install
33+
2734
- name: Publish to Chromatic
2835
uses: chromaui/action@v1
2936
with:

.github/workflows/create-new-release.yml

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,22 @@ jobs:
77
name: Create new release
88
runs-on: ubuntu-latest
99
steps:
10-
- uses: actions/checkout@v2
11-
- uses: actions/setup-node@v3
10+
- name: Checkout branch
11+
uses: actions/checkout@v3
12+
13+
- name: Setup Node
14+
uses: actions/setup-node@v3
1215
with:
13-
node-version-file: '.node-version'
14-
- run: |
15-
npm config set "@fortawesome:registry" https://npm.fontawesome.com/
16-
npm config set "//npm.fontawesome.com/:_authToken" ${{ secrets.FONTAWESOME_NPM_AUTH_TOKEN }}
17-
- run: yarn install
16+
node-version-file: ".node-version"
17+
18+
- name: Setup Yarn
19+
uses: volta-cli/action@v4
20+
21+
- name: Setup env
22+
run: echo "FONTAWESOME_NPM_AUTH_TOKEN=${{ secrets.FONTAWESOME_NPM_AUTH_TOKEN }}" > .env
23+
24+
- name: Install dependencies
25+
run: yarn install
1826

1927
- name: Initialize mandatory git config
2028
uses: fregante/setup-git-user@v1
Lines changed: 48 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,48 @@
1-
name: Deploy to github pages
2-
on:
3-
workflow_dispatch:
4-
push:
5-
branches:
6-
- main
7-
8-
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
9-
permissions:
10-
contents: read
11-
pages: write
12-
id-token: write
13-
14-
jobs:
15-
gh-pages-deploy:
16-
name: Deploying to gh-pages
17-
runs-on: ubuntu-latest
18-
steps:
19-
- name: Checkout branch
20-
uses: actions/checkout@v3
21-
22-
- name: Setup node
23-
uses: actions/setup-node@v3
24-
with:
25-
node-version-file: '.node-version'
26-
cache: 'yarn'
27-
28-
- name: Configure npm
29-
run: npm config set "@fortawesome:registry" https://npm.fontawesome.com/ &&
30-
npm config set "//npm.fontawesome.com/:_authToken" ${{ secrets.FONTAWESOME_NPM_AUTH_TOKEN }}
31-
32-
- name: Install dependencies
33-
run: yarn install
34-
35-
- name: Build
36-
run: yarn build-storybook
37-
38-
- name: Upload
39-
uses: actions/upload-pages-artifact@v3
40-
with:
41-
path: 'storybook-static'
42-
43-
- name: Deploy
44-
uses: actions/deploy-pages@v4
45-
with:
46-
token: ${{ github.token }}
1+
name: Deploy to github pages
2+
on:
3+
workflow_dispatch:
4+
push:
5+
branches:
6+
- main
7+
8+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
jobs:
15+
gh-pages-deploy:
16+
name: Deploying to gh-pages
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout branch
20+
uses: actions/checkout@v3
21+
22+
- name: Setup node
23+
uses: actions/setup-node@v3
24+
with:
25+
node-version-file: ".node-version"
26+
cache: "yarn"
27+
28+
- name: Setup Yarn
29+
uses: volta-cli/action@v4
30+
31+
- name: Setup env
32+
run: echo "FONTAWESOME_NPM_AUTH_TOKEN=${{ secrets.FONTAWESOME_NPM_AUTH_TOKEN }}" > .env
33+
34+
- name: Install dependencies
35+
run: yarn install
36+
37+
- name: Build
38+
run: yarn build-storybook
39+
40+
- name: Upload
41+
uses: actions/upload-pages-artifact@v3
42+
with:
43+
path: "storybook-static"
44+
45+
- name: Deploy
46+
uses: actions/deploy-pages@v4
47+
with:
48+
token: ${{ github.token }}

.github/workflows/lint.yml

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,22 @@ jobs:
66
js-lint:
77
runs-on: ubuntu-latest
88
steps:
9-
- uses: actions/checkout@v2
10-
- uses: actions/setup-node@v3
9+
- name: Checkout branch
10+
uses: actions/checkout@v3
11+
12+
- name: Setup Node
13+
uses: actions/setup-node@v3
1114
with:
12-
node-version-file: '.node-version'
13-
- run: |
14-
npm config set "@fortawesome:registry" https://npm.fontawesome.com/
15-
npm config set "//npm.fontawesome.com/:_authToken" ${{ secrets.FONTAWESOME_NPM_AUTH_TOKEN }}
16-
- run: yarn
17-
- run: yarn lint
15+
node-version-file: ".node-version"
16+
17+
- name: Setup Yarn
18+
uses: volta-cli/action@v4
19+
20+
- name: Setup env
21+
run: echo "FONTAWESOME_NPM_AUTH_TOKEN=${{ secrets.FONTAWESOME_NPM_AUTH_TOKEN }}" > .env
22+
23+
- name: Install dependencies
24+
run: yarn install
25+
26+
- name: Lint
27+
run: yarn lint

.github/workflows/prepare-hotfix.yml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,29 @@ on:
44
workflow_dispatch:
55
inputs:
66
version:
7-
description: 'The version you want to release.'
7+
description: "The version you want to release."
88
required: true
99

1010
jobs:
1111
prepare-hotfix:
1212
name: Prepare hotfix
1313
runs-on: ubuntu-latest
1414
steps:
15-
- uses: actions/checkout@v2
15+
- name: Checkout branch
16+
uses: actions/checkout@v3
1617
with:
1718
fetch-depth: 0
18-
- uses: actions/setup-node@v3
19+
20+
- name: Setup Node
21+
uses: actions/setup-node@v3
1922
with:
20-
node-version-file: '.node-version'
23+
node-version-file: ".node-version"
24+
25+
- name: Setup Yarn
26+
uses: volta-cli/action@v4
27+
28+
- name: Setup env
29+
run: echo "FONTAWESOME_NPM_AUTH_TOKEN=${{ secrets.FONTAWESOME_NPM_AUTH_TOKEN }}" > .env
2130

2231
- name: Create hotfix branch
2332
run: git checkout -b hotfix/${{ github.event.inputs.version }}
@@ -56,4 +65,3 @@ jobs:
5665
head: hotfix/${{ github.event.inputs.version }}
5766
base: develop
5867
title: Merge hotfix/${{ github.event.inputs.version }} into develop branch
59-

.github/workflows/prepare-release.yml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,29 @@ on:
44
workflow_dispatch:
55
inputs:
66
version:
7-
description: 'The version you want to release.'
7+
description: "The version you want to release."
88
required: true
99

1010
jobs:
1111
prepare-release:
1212
name: Prepare release
1313
runs-on: ubuntu-latest
1414
steps:
15-
- uses: actions/checkout@v2
15+
- name: Checkout branch
16+
uses: actions/checkout@v3
1617
with:
1718
fetch-depth: 0
18-
- uses: actions/setup-node@v3
19+
20+
- name: Setup Node
21+
uses: actions/setup-node@v3
1922
with:
20-
node-version-file: '.node-version'
23+
node-version-file: ".node-version"
24+
25+
- name: Setup Yarn
26+
uses: volta-cli/action@v4
27+
28+
- name: Setup env
29+
run: echo "FONTAWESOME_NPM_AUTH_TOKEN=${{ secrets.FONTAWESOME_NPM_AUTH_TOKEN }}" > .env
2130

2231
- name: Create release branch
2332
run: git checkout -b release/${{ github.event.inputs.version }}
@@ -56,4 +65,3 @@ jobs:
5665
head: release/${{ github.event.inputs.version }}
5766
base: develop
5867
title: Merge release/${{ github.event.inputs.version }} into develop branch
59-

.github/workflows/test.yml

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,22 @@ jobs:
66
js-test:
77
runs-on: ubuntu-latest
88
steps:
9-
- uses: actions/checkout@v2
10-
- uses: actions/setup-node@v3
9+
- name: Checkout branch
10+
uses: actions/checkout@v3
11+
12+
- name: Setup Node
13+
uses: actions/setup-node@v3
1114
with:
12-
node-version-file: '.node-version'
13-
- run: |
14-
npm config set "@fortawesome:registry" https://npm.fontawesome.com/
15-
npm config set "//npm.fontawesome.com/:_authToken" ${{ secrets.FONTAWESOME_NPM_AUTH_TOKEN }}
16-
- run: yarn
17-
- run: yarn test
15+
node-version-file: ".node-version"
16+
17+
- name: Setup Yarn
18+
uses: volta-cli/action@v4
19+
20+
- name: Setup env
21+
run: echo "FONTAWESOME_NPM_AUTH_TOKEN=${{ secrets.FONTAWESOME_NPM_AUTH_TOKEN }}" > .env
22+
23+
- name: Install dependencies
24+
run: yarn install
25+
26+
- name: Test
27+
run: yarn test

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ lib
2121
.env.test.local
2222
.env.production.local
2323
.npmrc
24+
.yarn
2425
.env
2526

2627
# Ignore Jetbrains IDE settings

.yarnrc.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
nodeLinker: node-modules
2+
3+
injectEnvironmentFiles:
4+
- .env
5+
6+
npmScopes:
7+
fortawesome:
8+
npmAlwaysAuth: true
9+
npmRegistryServer: "https://npm.fontawesome.com/"
10+
npmAuthToken: ${FONTAWESOME_NPM_AUTH_TOKEN}

bin/migrate-yarn

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
3+
volta install [email protected]
4+
volta setup
5+
touch .env
6+
7+
FONTAWESOME_NPM_AUTH_TOKEN=$(echo "$FONTAWESOME_NPM_AUTH_TOKEN" | sed -n 's/.*authToken=//p' .npmrc)
8+
echo "FONTAWESOME_NPM_AUTH_TOKEN=${FONTAWESOME_NPM_AUTH_TOKEN}" >> .env

0 commit comments

Comments
 (0)