Skip to content
This repository was archived by the owner on Nov 12, 2024. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
name: CI

on: [push]
on:
pull_request:
merge_group:
types: [checks_requested]
workflow_call:

jobs:
build:
name: Build and Test
runs-on: ubuntu-latest
strategy:
matrix:
node: [18, 20, 22]
node: [20]
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
64 changes: 64 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Release

on:
push:
branches:
- main
- next
- alpha
- beta

concurrency:
group: publish-${{ github.ref }}

env:
NODE_VERSION: 20

jobs:
verify:
name: Verify
uses: ./.github/workflows/ci.yml

release:
name: Release
runs-on: ubuntu-latest
needs: [verify]
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false

- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}

- name: Install dependencies
run: npm ci

- name: Build
run: npm run build

- name: Semantic Release
uses: cycjimmy/semantic-release-action@v3
id: semantic
with:
# NOTE: ^19 is ESM and was causing a break
semantic_version: ^18
branches: |
[
'+([0-9])?(.{+([0-9]),x}).x',
'main',
'next',
'next-major',
{name: 'beta', prerelease: true},
{name: 'alpha', prerelease: true}
]
# Config override used disable features of @semantic-release/github causing rate limit
# @semantic-release/exec is installed internally
extends: |
@side/semantic-config-base
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# Save exact versions
save-exact=true
//registry.npmjs.org/:_authToken=${NPM_TOKEN}
8 changes: 2 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
{
"name": "swr-openapi",
"name": "@side/swr-openapi",
"type": "module",
"version": "5.0.0",
"description": "Generate SWR hooks from OpenAPI schemas",
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/htunnicliff/swr-openapi.git"
},
"funding": "https://github.com/sponsors/htunnicliff",
"author": {
"name": "Hunter Tunnicliff"
"url": "git+https://github.com/reside-eng/swr-openapi.git"
},
"engines": {
"node": ">=18"
Expand Down