Skip to content

Commit

Permalink
Merge branch 'main' into delay-revalidation
Browse files Browse the repository at this point in the history
  • Loading branch information
promer94 committed Jan 24, 2023
2 parents 39018db + 1726bc6 commit fe8a088
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 18 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/install/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: 'Install'
description: 'Set up and install dependencies'

inputs:
fetch-depth:
default: '1'
required: false
persist-credentials:
default: true
required: false


runs:
using: composite
steps:
- name: Check out
uses: actions/checkout@v3

- name: Setup pnpm
uses: pnpm/action-setup@v2.2.2

- name: Use Node.js 16
uses: actions/setup-node@v3
with:
node-version: 16
cache: pnpm

- name: Install Dependencies
shell: bash

run: |
corepack enable
pnpm install
env:
CI: true
22 changes: 22 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Release

on:
push:
tags:
- v*

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v3

- name: Install
uses: ./.github/workflows/install

- name: Publish
run: pnpm publish
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN_ELEVATED }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26 changes: 10 additions & 16 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,17 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Checkout
uses: actions/checkout@v3

- name: Setup pnpm
uses: pnpm/action-setup@v2.2.2
with:
version: 7
- name: Install
uses: ./.github/workflows/install

- name: Use Node.js 16
uses: actions/setup-node@v3
with:
node-version: 16
cache: pnpm

- run: pnpm install
- run: pnpm run-all-checks
- run: pnpm clean
- run: pnpm build
- run: pnpm test-packaging
- name: Lint
run: |
pnpm run-all-checks
pnpm clean
pnpm build
pnpm test-packaging
env:
CI: true
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "swr",
"version": "2.0.0",
"version": "2.0.1",
"description": "React Hooks library for remote data fetching",
"keywords": [
"swr",
Expand Down Expand Up @@ -138,4 +138,4 @@
"dependencies": {
"use-sync-external-store": "^1.2.0"
}
}
}

0 comments on commit fe8a088

Please sign in to comment.