Skip to content

Commit

Permalink
ci: simplify setup and use caching (#8355)
Browse files Browse the repository at this point in the history
  • Loading branch information
domoritz committed Aug 12, 2022
1 parent d2699a1 commit 01d2dbc
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 14 deletions.
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

0 comments on commit 01d2dbc

Please sign in to comment.