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

chore: auto publish #38

Merged
merged 7 commits into from
Aug 23, 2023
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
11 changes: 11 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/config@2.3.1/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: CI
on: [push]

# cancel in-progress runs on new commits to same PR (gitub.event.number)
# Automatically cancel in-progress actions on the same branch
concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.sha }}
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
Expand Down
41 changes: 41 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: CI

on:
push:
branches:
- main

permissions:
contents: write
pull-requests: write
packages: write

# Automatically cancel in-progress actions on the same branch
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
build:
name: Build Packages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
- uses: actions/setup-node@v3
with:
node-version: 18
cache: 'pnpm'
- if: ${{ steps.cache-node.outputs.cache-hit != 'true' }}
run: pnpm install
- run: pnpm run build
- uses: changesets/action@v1
if: ${{ github.event_name != 'pull_request' }}
with:
version: pnpm run ci:version
publish: pnpm run ci:publish
commit: '[ci] release'
title: '[ci] release'
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28 changes: 28 additions & 0 deletions .verdaccio/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# path to a directory with all packages
storage: ../tmp/local-registry/storage

# a list of other known repositories we can talk to
uplinks:
npmjs:
url: https://registry.npmjs.org/
maxage: 60m

packages:
'**':
# give all users (including non-authenticated users) full access
# because it is a local registry
access: $all
publish: $all
unpublish: $all

# if package is not available locally, proxy requests to npm registry
proxy: npmjs

# log settings
logs:
type: stdout
format: pretty
level: warn

publish:
allow_offline: true # set offline to true to allow publish offline
14 changes: 11 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@
"size": "size-limit",
"analyze": "size-limit --why",
"test": "nx test headless-stepper",
"test:watch": "npm run nx run headless-stepper:test -- --watch"
"test:watch": "npm run nx run headless-stepper:test -- --watch",
"local-registry": "nx run local-registry",
"ci:version": "changeset version",
"ci:publish": "changeset publish"
},
"private": true,
"devDependencies": {
Expand Down Expand Up @@ -78,6 +81,7 @@
"tsup": "^7.1.0",
"typescript": "5.1.6",
"url-loader": "^4.1.1",
"verdaccio": "^5.0.4",
"vite": "4.3.9",
"vite-tsconfig-paths": "4.2.0",
"vitest": "0.31.4",
Expand All @@ -88,6 +92,7 @@
"packages/**"
],
"dependencies": {
"@changesets/cli": "^2.26.2",
"core-js": "^3.6.5",
"next": "^13.1.1",
"react": "18.2.0",
Expand All @@ -103,5 +108,8 @@
"path": "packages/headless-stepper/dist/index.mjs",
"limit": "15 KB"
}
]
}
],
"nx": {
"includedScripts": []
}
}
3 changes: 3 additions & 0 deletions packages/headless-stepper/.npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@ project.json
.storybook/
src/lib/examples/*
.eslintrc.json
components/tsup.config.ts
components/scripts/*
components/src/*
7 changes: 7 additions & 0 deletions packages/headless-stepper/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# headless-stepper

## 1.9.1

### Patch Changes

- chore: remove unncessary files from component

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions packages/headless-stepper/components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"dist"
],
"peerDependencies": {
"headless-stepper": "^1.8.0"
}
}
"headless-stepper": "latest"
},
"private": true
}
2 changes: 1 addition & 1 deletion packages/headless-stepper/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "headless-stepper",
"description": "Production ready React hook to create awesome stepper components. Effortless to use, easy to customize.",
"version": "1.9.0",
"version": "1.9.1-beta.1",
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React from 'react';
import { useStepper } from '../hooks/useStepper';
import styles from './HeadlessStepper.module.css';

/* eslint-disable-next-line */
export interface HeadlessStepperProps {}
Expand All @@ -24,7 +23,7 @@ export function HeadlessStepper(props: HeadlessStepperProps) {
steps,
});
return (
<div className={styles['container']}>
<div>
<h1>Welcome to HeadlessStepper!</h1>
<div>
<nav style={{ display: 'flex' }} {...stepperProps}>
Expand Down
Loading
Loading