Skip to content

Commit

Permalink
simplify ci config
Browse files Browse the repository at this point in the history
  • Loading branch information
promer94 committed Jul 21, 2023
1 parent 14cf9f2 commit 10dad59
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 43 deletions.
1 change: 0 additions & 1 deletion .github/workflows/install/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ runs:
- name: Install Dependencies
shell: bash
run: |
corepack enable
node -v
pnpm -v
pnpm install
2 changes: 1 addition & 1 deletion .github/workflows/test-canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
uses: ./.github/workflows/install

- name: Install Canary
run: corepack pnpm upgrade react@canary react-dom@canary use-sync-external-store@canary
run: pnpm upgrade react@canary react-dom@canary use-sync-external-store@canary

- name: Lint and test
run: |
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/test-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,12 @@ jobs:
pnpm run-all-checks
pnpm clean
pnpm build
pnpm attw
pnpm test:build
e2e:
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/playwright:v1.34.3-focal
image: mcr.microsoft.com/playwright:v1.36.1-focal
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down
42 changes: 2 additions & 40 deletions .github/workflows/trigger-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ on:
options:
- beta
- stable

semverType:
description: semver type?
type: choice
Expand All @@ -17,68 +16,31 @@ on:
- minor
- major

secrets:
RELEASE_BOT_GITHUB_TOKEN:
required: true

name: Trigger Release

env:
PNPM_VERSION: 8.4.0
SEMVER_TYPE: ${{ github.event.inputs.semverType }}
RELEASE_TYPE: ${{ github.event.inputs.releaseType }}

jobs:
start:
runs-on: ubuntu-latest

environment: release-${{ github.event.inputs.releaseType }}-${{ github.event.inputs.semverType }}
steps:
- name: Setup node
uses: actions/setup-node@v3
if: ${{ steps.docs-change.outputs.docsChange == 'nope' }}
with:
node-version: 18
check-latest: true

- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 10
token: ${{ secrets.RELEASE_BOT_GITHUB_TOKEN }}

- run: npm i -g pnpm@${PNPM_VERSION}

- id: get-store-path
run: echo STORE_PATH=$(pnpm store path) >> $GITHUB_OUTPUT

- uses: actions/cache@v3
timeout-minutes: 5
id: cache-pnpm-store
with:
path: ${{ steps.get-store-path.outputs.STORE_PATH }}
key: pnpm-store-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
pnpm-store-
pnpm-store-${{ hashFiles('pnpm-lock.yaml') }}
- run: pnpm install

- name: install
uses: ./.github/workflows/install
- run: |
pnpm run-all-checks
pnpm clean
pnpm build
pnpm test:build
- name: Configure git
run: |
git config user.name "vercel-release-bot"
git config user.email "[email protected]"
- name: Bump version and tag
run: |
node ./scripts/bump-next-version.js
- name: Git push
env:
RELEASE_BOT_GITHUB_TOKEN: ${{ secrets.RELEASE_BOT_GITHUB_TOKEN }}
Expand Down

0 comments on commit 10dad59

Please sign in to comment.