Skip to content

Commit b1d88da

Browse files
committed
fix: test workflow environments
1 parent 9302031 commit b1d88da

File tree

11 files changed

+4729
-5108
lines changed

11 files changed

+4729
-5108
lines changed

.github/workflows/prerelease.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,21 @@
11
on:
22
pull_request:
3-
branches: [master]
3+
branches:
4+
- master
5+
46
name: prerelease
7+
58
jobs:
69
prerelease:
710
runs-on: ubuntu-latest
11+
environment: ci
12+
env:
13+
CODEARTIFACT_AUTH_TOKEN: ${{ secrets.CODEARTIFACT_AUTH_TOKEN }}
814
steps:
9-
- uses: actions/checkout@v2
10-
- name: Use Node.js 20
11-
uses: actions/setup-node@v2
15+
- uses: actions/checkout@v5
16+
- uses: actions/setup-node@v6
1217
with:
13-
node-version: 20
18+
node-version-file: '.tool-versions'
1419
- run: yarn install --immutable
1520
- run: yarn dist
1621
- run: npm version prerelease --preid=$GITHUB_HEAD_REF-`git rev-parse --short HEAD` --git-tag-version=false --commit-hooks=false

.github/workflows/release-please.yml

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,19 @@ on:
22
push:
33
branches:
44
- master
5-
name: release-please-pr
5+
6+
name: release-please
7+
68
jobs:
79
release-pr:
810
runs-on: ubuntu-latest
11+
environment: ci
12+
env:
13+
CODEARTIFACT_AUTH_TOKEN: ${{ secrets.CODEARTIFACT_AUTH_TOKEN }}
914
steps:
10-
- uses: actions/setup-node@v2
15+
- uses: actions/setup-node@v6
1116
with:
12-
node-version: 20
17+
node-version-file: '.tool-versions'
1318
- uses: google-github-actions/release-please-action@v3
1419
id: release-please
1520
with:
@@ -25,7 +30,7 @@ jobs:
2530
with:
2631
result-encoding: string
2732
script: return JSON.parse(process.env.PR_NUM).headBranchName
28-
- uses: actions/checkout@v2
33+
- uses: actions/checkout@v5
2934
if: ${{ steps.release-please.outputs.pr }}
3035
with:
3136
ref: ${{ steps.extract-branch.outputs.result }}
@@ -40,18 +45,21 @@ jobs:
4045

4146
release:
4247
runs-on: ubuntu-latest
48+
environment: ci
49+
env:
50+
CODEARTIFACT_AUTH_TOKEN: ${{ secrets.CODEARTIFACT_AUTH_TOKEN }}
4351
steps:
4452
- uses: google-github-actions/release-please-action@v3
4553
id: release
4654
with:
4755
release-type: node
4856
package-name: '@appfolio/react-gears'
4957
command: github-release
50-
- uses: actions/checkout@v2
58+
- uses: actions/checkout@v5
5159
if: ${{ steps.release.outputs.release_created }}
52-
- uses: actions/setup-node@v2
60+
- uses: actions/setup-node@v6
5361
with:
54-
node-version: 20
62+
node-version-file: '.tool-versions'
5563
if: ${{ steps.release.outputs.release_created }}
5664
- run: yarn install --immutable
5765
if: ${{ steps.release.outputs.release_created }}
@@ -66,6 +74,5 @@ jobs:
6674
- name: Publish to npm
6775
run: |
6876
npm config set registry https://registry.npmjs.org
69-
npm config set //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}
7077
npm publish --access public
7178
if: ${{ steps.release.outputs.release_created }}

.github/workflows/test.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
1-
# This workflow will do a clean install of node dependencies, build the source code and run tests.
2-
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3-
4-
name: Node.js CI
5-
61
on:
72
push:
8-
branches: [master]
3+
branches:
4+
- master
95
pull_request:
10-
branches: [master]
6+
branches:
7+
- master
8+
9+
name: test
1110

1211
jobs:
1312
test:
1413
runs-on: ubuntu-latest
15-
14+
environment: ci
15+
env:
16+
CODEARTIFACT_AUTH_TOKEN: ${{ secrets.CODEARTIFACT_AUTH_TOKEN }}
1617
steps:
17-
- uses: actions/checkout@v2
18-
- name: Use Node.js 20
19-
uses: actions/setup-node@v1
18+
- uses: actions/checkout@v5
19+
- uses: actions/setup-node@v6
2020
with:
21-
node-version: 20
21+
node-version-file: '.tool-versions'
2222
- run: yarn install --immutable
2323
- run: yarn lint
2424
- run: yarn format

.npmrc

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

.tool-versions

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
nodejs 20.14.0
2-
yarn 1.22.18
1+
nodejs 24.11.0
2+
yarn 1.22.18

.yarn/plugins/@yarnpkg/plugin-version.cjs

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

.yarn/releases/yarn-3.2.2.cjs

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

.yarn/releases/yarn-4.10.3.cjs

Lines changed: 942 additions & 0 deletions
Large diffs are not rendered by default.

.yarnrc.yml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
1+
compressionLevel: mixed
2+
3+
enableGlobalCache: false
4+
5+
enableTelemetry: false
6+
17
nodeLinker: node-modules
2-
plugins:
3-
- path: .yarn/plugins/@yarnpkg/plugin-version.cjs
4-
spec: "@yarnpkg/plugin-version"
5-
yarnPath: .yarn/releases/yarn-3.2.2.cjs
6-
npmRegistryServer: https://appfolio-ecr-195334327833.d.codeartifact.us-west-2.amazonaws.com/npm/appfolio-repo/
8+
79
npmAlwaysAuth: true
8-
enableTelemetry: false
9-
npmAuthToken: ${CODEARTIFACT_AUTH_TOKEN}
10+
11+
npmAuthToken: "${CODEARTIFACT_AUTH_TOKEN}"
12+
13+
npmRegistryServer: "https://appfolio-ecr-195334327833.d.codeartifact.us-west-2.amazonaws.com/npm/appfolio-repo/"
14+
15+
yarnPath: .yarn/releases/yarn-4.10.3.cjs

package.json

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"url": "https://github.com/appfolio/react-gears.git"
99
},
1010
"license": "MIT",
11-
"packageManager": "yarn@3.2.2",
11+
"packageManager": "yarn@4.10.3",
1212
"main": "lib/index.js",
1313
"module": "esm/index.js",
1414
"types": "esm/index.d.ts",
@@ -161,9 +161,6 @@
161161
},
162162
"resolutions": {
163163
"@types/react": "^16.14.26",
164-
"@types/react-dom": "^16.9.16",
165-
"socks/ip": "git+https://github.com/zaptic/neoip.git#v2.1.0"
166-
},
167-
"browserslist": "last 2 versions",
168-
"stableVersion": "7.7.0"
164+
"@types/react-dom": "^16.9.16"
165+
}
169166
}

0 commit comments

Comments
 (0)