Skip to content

Commit 056a92b

Browse files
authored
Merge pull request #102 from UW-Macrostrat/prepare-release
Prepare to release a ton of package versions
2 parents 7e49ef2 + 8576e3e commit 056a92b

File tree

338 files changed

+5464
-4042
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

338 files changed

+5464
-4042
lines changed

.github/workflows/dev.build.yaml renamed to .github/workflows/continuous-deployment.yaml

Lines changed: 43 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,79 @@
1-
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
2-
permissions:
3-
contents: read
4-
pages: write
5-
id-token: write
1+
name: Continuous integration and deployment
2+
3+
# On the main branch, successful commits will trigger a deployment to NPM
4+
# and building the storybook.
65

76
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
87
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
98
concurrency:
10-
group: "pages"
9+
group: "deployment"
1110
cancel-in-progress: false
1211

1312
on:
13+
# When pushing, we also want to deploy packages to NPM
1414
push:
1515
branches: [main]
1616

17-
env:
18-
VITE_MAPBOX_API_TOKEN: ${{ secrets.VITE_MAPBOX_API_TOKEN }}
19-
2017
jobs:
21-
test:
22-
name: CI build
18+
prepare-and-publish-packages:
19+
name: Prepare and publish packages
2320
runs-on: ubuntu-latest
24-
environment: development
21+
env:
22+
# Ensure that Chalk uses colors in the output
23+
FORCE_COLOR: 2
2524
steps:
26-
2725
- name: Check out repository
2826
uses: actions/checkout@v4
2927

3028
- name: Setup node
3129
uses: actions/setup-node@v4
3230
with:
3331
node-version: 22
32+
cache: "yarn"
33+
34+
- name: Install dependencies
35+
run: |
36+
yarn install --frozen-lockfile
37+
38+
- name: Build all packages
39+
run: |
40+
yarn run build
41+
42+
- name: Publish and tag releases
43+
run: |
44+
yarn run publish
45+
env:
46+
YARN_NPM_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
3447

35-
- name: Pin react-docgen version
36-
run: yarn add -D [email protected]
48+
build-storybook:
49+
name: Build and deploy storybook
50+
runs-on: ubuntu-latest
51+
environment: development
52+
steps:
53+
- name: Check out repository
54+
uses: actions/checkout@v4
55+
56+
- name: Setup node
57+
uses: actions/setup-node@v4
58+
with:
59+
node-version: 22
60+
cache: "yarn"
3761

3862
- name: Install dependencies
3963
run: |
40-
yarn install
64+
yarn install --frozen-lockfile
4165
4266
- name: Build storybook
4367
run: |
4468
yarn run build:storybook
69+
env:
70+
VITE_MAPBOX_API_TOKEN: ${{ secrets.VITE_MAPBOX_API_TOKEN }}
4571

4672
- name: Install rclone
4773
run: |
4874
curl https://rclone.org/install.sh | sudo bash
4975
50-
- name: Upload to S3
76+
- name: Upload storybook to S3
5177
env:
5278
S3_BUCKET: ${{ vars.S3_BUCKET }}
5379
S3_PATH: ${{ vars.S3_PATH }}

.github/workflows/dev.pr.yaml

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

.github/workflows/format-code.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Format code
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
push:
7+
branches: [main]
8+
9+
jobs:
10+
format-code:
11+
name: Format code
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Check out repository
15+
uses: actions/checkout@v4
16+
17+
- name: Setup node
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: 22
21+
22+
- name: Install Prettier
23+
# Use global install to ensure Prettier is available
24+
# and that we don't modify the package.json
25+
run: |
26+
npm install -g prettier
27+
28+
# Prettify code and commit if changes
29+
- name: Format code
30+
run: |
31+
prettier --write .
32+
33+
- name: Commit changes
34+
uses: stefanzweifel/git-auto-commit-action@v4
35+
with:
36+
commit_message: Apply formatting changes
37+
branch: ${{ github.head_ref }}
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: Continuous integration
2+
3+
# Group requests for the same pull request to avoid multiple builds
4+
concurrency:
5+
group: ${{ github.head_ref || github.ref_name }}
6+
cancel-in-progress: true
7+
8+
on:
9+
pull_request:
10+
branches: [main]
11+
12+
jobs:
13+
prepare-and-build-packages:
14+
name: Prepare and build packages
15+
runs-on: ubuntu-latest
16+
env:
17+
# Ensure that Chalk uses colors in the output
18+
FORCE_COLOR: 2
19+
steps:
20+
- name: Check out repository
21+
uses: actions/checkout@v4
22+
23+
- name: Setup node
24+
uses: actions/setup-node@v4
25+
with:
26+
node-version: 22
27+
cache: "yarn"
28+
29+
- name: Install dependencies
30+
run: |
31+
yarn install --frozen-lockfile
32+
33+
# We could probably get the release status
34+
# without installing all dependencies,
35+
# allowing this to be set up as another job.
36+
- name: Get release status
37+
id: status
38+
run: |
39+
yarn run status
40+
if: always()
41+
42+
- name: Build all packages
43+
id: build
44+
run: |
45+
yarn run build
46+
if: always()
47+
48+
- name: Final check
49+
if: always()
50+
run: |
51+
echo "Checking the outcome of build steps..."
52+
if [ "${{ steps.status.outcome }}" != "success" ] || [ "${{ steps.build.outcome }}" != "success" ]; then
53+
echo "One or more checks failed."
54+
exit 1
55+
fi
56+
57+
build-storybook:
58+
name: Build storybook
59+
runs-on: ubuntu-latest
60+
steps:
61+
- name: Check out repository
62+
uses: actions/checkout@v4
63+
64+
- name: Setup node
65+
uses: actions/setup-node@v4
66+
with:
67+
node-version: 22
68+
cache: "yarn"
69+
70+
- name: Install dependencies
71+
run: |
72+
yarn install --frozen-lockfile
73+
74+
- name: Build storybook
75+
run: |
76+
yarn run build:storybook

.vscode/extensions.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
11
{
2-
"recommendations": [
3-
"arcanis.vscode-zipfs",
4-
"esbenp.prettier-vscode"
5-
]
2+
"recommendations": ["arcanis.vscode-zipfs", "esbenp.prettier-vscode"]
63
}

.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"**/.yarn": true,
44
"**/.pnp.*": true
55
},
6-
"prettier.prettierPath": ".yarn/sdks/prettier/index.js",
6+
"prettier.prettierPath": ".yarn/sdks/prettier/index.cjs",
77
"files.exclude": {
88
"**/.git": true,
99
"**/.svn": true,
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
#!/usr/bin/env node
22

3-
const {existsSync} = require(`fs`);
4-
const {createRequire, register} = require(`module`);
5-
const {resolve} = require(`path`);
6-
const {pathToFileURL} = require(`url`);
3+
const { existsSync } = require(`fs`);
4+
const { createRequire, register } = require(`module`);
5+
const { resolve } = require(`path`);
6+
const { pathToFileURL } = require(`url`);
77

8-
const relPnpApiPath = "../../../.pnp.cjs";
8+
const relPnpApiPath = "../../../../.pnp.cjs";
99

1010
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
1111
const absUserWrapperPath = resolve(__dirname, `./sdk.user.cjs`);
@@ -16,7 +16,7 @@ const isPnpLoaderEnabled = existsSync(absPnpLoaderPath);
1616

1717
if (existsSync(absPnpApiPath)) {
1818
if (!process.versions.pnp) {
19-
// Setup the environment to be able to require prettier/bin-prettier.js
19+
// Setup the environment to be able to require prettier/bin/prettier.cjs
2020
require(absPnpApiPath).setup();
2121
if (isPnpLoaderEnabled && register) {
2222
register(pathToFileURL(absPnpLoaderPath));
@@ -25,8 +25,8 @@ if (existsSync(absPnpApiPath)) {
2525
}
2626

2727
const wrapWithUserWrapper = existsSync(absUserWrapperPath)
28-
? exports => absRequire(absUserWrapperPath)(exports)
29-
: exports => exports;
28+
? (exports) => absRequire(absUserWrapperPath)(exports)
29+
: (exports) => exports;
3030

31-
// Defer to the real prettier/bin-prettier.js your application uses
32-
module.exports = wrapWithUserWrapper(absRequire(`prettier/bin-prettier.js`));
31+
// Defer to the real prettier/bin/prettier.cjs your application uses
32+
module.exports = wrapWithUserWrapper(absRequire(`prettier/bin/prettier.cjs`));
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#!/usr/bin/env node
22

3-
const {existsSync} = require(`fs`);
4-
const {createRequire, register} = require(`module`);
5-
const {resolve} = require(`path`);
6-
const {pathToFileURL} = require(`url`);
3+
const { existsSync } = require(`fs`);
4+
const { createRequire, register } = require(`module`);
5+
const { resolve } = require(`path`);
6+
const { pathToFileURL } = require(`url`);
77

88
const relPnpApiPath = "../../../.pnp.cjs";
99

@@ -25,8 +25,8 @@ if (existsSync(absPnpApiPath)) {
2525
}
2626

2727
const wrapWithUserWrapper = existsSync(absUserWrapperPath)
28-
? exports => absRequire(absUserWrapperPath)(exports)
29-
: exports => exports;
28+
? (exports) => absRequire(absUserWrapperPath)(exports)
29+
: (exports) => exports;
3030

3131
// Defer to the real prettier your application uses
3232
module.exports = wrapWithUserWrapper(absRequire(`prettier`));

.yarn/sdks/prettier/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "prettier",
3-
"version": "2.8.8-sdk",
4-
"main": "./index.js",
3+
"version": "3.6.1-sdk",
4+
"main": "./index.cjs",
55
"type": "commonjs",
6-
"bin": "./bin-prettier.js"
6+
"bin": "./bin/prettier.cjs"
77
}

.yarn/sdks/typescript/bin/tsc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#!/usr/bin/env node
22

3-
const {existsSync} = require(`fs`);
4-
const {createRequire, register} = require(`module`);
5-
const {resolve} = require(`path`);
6-
const {pathToFileURL} = require(`url`);
3+
const { existsSync } = require(`fs`);
4+
const { createRequire, register } = require(`module`);
5+
const { resolve } = require(`path`);
6+
const { pathToFileURL } = require(`url`);
77

88
const relPnpApiPath = "../../../../.pnp.cjs";
99

@@ -25,8 +25,8 @@ if (existsSync(absPnpApiPath)) {
2525
}
2626

2727
const wrapWithUserWrapper = existsSync(absUserWrapperPath)
28-
? exports => absRequire(absUserWrapperPath)(exports)
29-
: exports => exports;
28+
? (exports) => absRequire(absUserWrapperPath)(exports)
29+
: (exports) => exports;
3030

3131
// Defer to the real typescript/bin/tsc your application uses
3232
module.exports = wrapWithUserWrapper(absRequire(`typescript/bin/tsc`));

0 commit comments

Comments
 (0)