Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: simplify setup and use caching #8355

Merged
merged 6 commits into from Aug 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
19 changes: 14 additions & 5 deletions .github/workflows/publish-to-npm.yml
Expand Up @@ -14,21 +14,30 @@ jobs:
if: "!contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci')"

name: Make a release and publish to NPM

steps:
- uses: actions/checkout@v3

- name: Prepare repository
run: git fetch --unshallow --tags
with:
fetch-depth: 0

- uses: actions/setup-node@v3
with:
registry-url: 'https://registry.npmjs.org'
cache: 'yarn'
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Install Node dependencies
run: yarn --frozen-lockfile

- run: npm run release
- name: Build
run: yarn build

- name: Check NPM deployment
run: ./scripts/check-npm.sh

- name: Create release
run: npm run shipit
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
7 changes: 0 additions & 7 deletions .github/workflows/release-docs-and-schema.yml
Expand Up @@ -39,13 +39,6 @@ jobs:
env:
GH_PAT: ${{ secrets.GH_PAT }}

- name: Check NPM deployment
run: ./scripts/check-npm.sh

- uses: actions/setup-node@v3
with:
registry-url: 'https://registry.npmjs.org'

- name: Prebuild website
run: yarn predeploy:site

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Expand Up @@ -7,7 +7,7 @@ on:
pull_request:

jobs:
test-matrix:
test:
name: Node
runs-on: ubuntu-latest

Expand Down
3 changes: 2 additions & 1 deletion package.json
Expand Up @@ -71,7 +71,8 @@
"watch:site": "yarn build:site -w",
"watch:test": "yarn jest --watch test/",
"watch:test:runtime": "NODE_OPTIONS=--experimental-vm-modules TZ=America/Los_Angeles npx jest --watch test-runtime/ --config test-runtime/jest-config.json",
"release": "yarn run prebuild && yarn build && auto shipit"
"release": "yarn run prebuild && yarn build && yarn shipit",
"shipit": "auto shipit"
},
"repository": {
"type": "git",
Expand Down