Skip to content

Commit

Permalink
Update CI to use shared config v1 and .node-version
Browse files Browse the repository at this point in the history
  • Loading branch information
EmrysMyrddin committed Jul 29, 2024
1 parent a7fce80 commit 8828cf1
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 52 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@ jobs:
uses: actions/checkout@v4

- name: Setup env
uses: the-guild-org/shared-config/setup@main
with:
nodeVersion: 22
packageManager: 'pnpm'
uses: the-guild-org/shared-config/setup@v1

- name: Build
run: pnpm run build
Expand Down
10 changes: 3 additions & 7 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,16 @@ on:

jobs:
dependencies:
uses: the-guild-org/shared-config/.github/workflows/changesets-dependencies.yaml@main
uses: the-guild-org/shared-config/.github/workflows/changesets-dependencies.yaml@v1
if: ${{ github.event.pull_request.title != 'Upcoming Release Changes' }}
with:
installDependencies: true
packageManager: pnpm
nodeVersion: 22
preCommit: 'pnpm run prettier'
secrets:
githubToken: ${{ secrets.GUILD_BOT_TOKEN }}

alpha:
uses: the-guild-org/shared-config/.github/workflows/release-snapshot.yml@main
uses: the-guild-org/shared-config/.github/workflows/release-snapshot.yml@v1
if: ${{ github.event.pull_request.title != 'Upcoming Release Changes' }}
with:
npmTag: alpha
Expand All @@ -29,14 +27,12 @@ jobs:
npmToken: ${{ secrets.NODE_AUTH_TOKEN }}

release-candidate:
uses: the-guild-org/shared-config/.github/workflows/release-snapshot.yml@main
uses: the-guild-org/shared-config/.github/workflows/release-snapshot.yml@v1
if: ${{ github.event.pull_request.title == 'Upcoming Release Changes' }}
with:
npmTag: rc
restoreDeletedChangesets: true
buildScript: build
nodeVersion: 22
packageManager: 'pnpm'
secrets:
githubToken: ${{ secrets.GITHUB_TOKEN }}
npmToken: ${{ secrets.NODE_AUTH_TOKEN }}
4 changes: 1 addition & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,9 @@ on:

jobs:
stable:
uses: the-guild-org/shared-config/.github/workflows/release-stable.yml@main
uses: the-guild-org/shared-config/.github/workflows/release-stable.yml@v1
with:
releaseScript: release
nodeVersion: 22
packageManager: 'pnpm'
secrets:
githubToken: ${{ secrets.GUILD_BOT_TOKEN }}
npmToken: ${{ secrets.NODE_AUTH_TOKEN }}
29 changes: 6 additions & 23 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,15 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Setup env
uses: the-guild-org/shared-config/setup@main
with:
nodeVersion: 22
packageManager: 'pnpm'
uses: the-guild-org/shared-config/setup@v1
- name: Lint Prettier
run: pnpm run lint:prettier

lint:
name: Lint
uses: the-guild-org/shared-config/.github/workflows/lint.yml@main
uses: the-guild-org/shared-config/.github/workflows/lint.yml@v1
with:
script: pnpm run ci:lint
nodeVersion: 22
packageManager: 'pnpm'
secrets:
githubToken: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -40,10 +35,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Setup env
uses: the-guild-org/shared-config/setup@main
with:
nodeVersion: 20
packageManager: 'pnpm'
uses: the-guild-org/shared-config/setup@v1
- name: Use GraphQL v${{matrix.graphql_version}}
run: node ./scripts/match-graphql.js ${{matrix.graphql_version}}
- name: Install Dependencies using pnpm
Expand All @@ -61,10 +53,7 @@ jobs:
- name: Checkout Master
uses: actions/checkout@v4
- name: Setup env
uses: the-guild-org/shared-config/setup@main
with:
nodeVersion: 22
packageManager: 'pnpm'
uses: the-guild-org/shared-config/setup@v1
- name: Install Dependencies
run: pnpm install --no-frozen-lockfile && git checkout pnpm-lock.yaml
- name: Cache Jest
Expand Down Expand Up @@ -93,10 +82,7 @@ jobs:
- name: Checkout Master
uses: actions/checkout@v4
- name: Setup env
uses: the-guild-org/shared-config/setup@main
with:
nodeVersion: ${{ matrix.node-version }}
packageManager: 'pnpm'
uses: the-guild-org/shared-config/setup@v1
- name: Use GraphQL v${{matrix.graphql_version}}
run: node ./scripts/match-graphql.js ${{matrix.graphql_version}}
- name: Install Dependencies
Expand All @@ -120,10 +106,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Setup env
uses: the-guild-org/shared-config/setup@main
with:
nodeVersion: 22
packageManager: 'pnpm'
uses: the-guild-org/shared-config/setup@v1
- name: Build Packages
run: pnpm run build
- name: Test ESM & CJS exports integrity
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,9 @@ jobs:
with:
fetch-depth: 0

- uses: the-guild-org/shared-config/setup@main
- uses: the-guild-org/shared-config/setup@v1
name: setup env
with:
nodeVersion: 22
packageManager: pnpm
- uses: the-guild-org/shared-config/website-cf@main
- uses: the-guild-org/shared-config/website-cf@v1
name: build and deploy website
env:
NEXT_BASE_PATH: ${{ github.ref == 'refs/heads/main' && '/graphql/envelop' || '' }}
Expand Down
1 change: 1 addition & 0 deletions .node-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v22
40 changes: 30 additions & 10 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 8828cf1

Please sign in to comment.