Skip to content

Commit

Permalink
Merge pull request #52 from uNotesOfficial/automate_changeset_publish
Browse files Browse the repository at this point in the history
automate_changeset_publish
  • Loading branch information
bassem97 authored Aug 13, 2023
2 parents dc731eb + 80ce022 commit 2b69825
Show file tree
Hide file tree
Showing 6 changed files with 627 additions and 9 deletions.
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/[email protected]/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "master",
"updateInternalDependencies": "patch",
"ignore": []
}
5 changes: 5 additions & 0 deletions .changeset/spotty-knives-cross.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@bassem97/upup': minor
---

add changeset to automate publishing the stable version of upup
37 changes: 37 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Publish
on:
push:
branches:
- master

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3

- uses: pnpm/action-setup@v2
with:
version: 7

- uses: actions/setup-node@v3
with:
node-version: 16.x
cache: 'pnpm'

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Create Release Pull Request or Publish
id: changesets
uses: changesets/action@v1
with:
publish: pnpm run release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "@bassem97/upup",
"author": "Bassem Jadoui",
"module": "dist/upup.esm.js",
"license": "MIT",
"version": "1.3.20",
"repository": {
Expand All @@ -11,6 +10,8 @@
"homepage": "",
"readme": "README.md",
"main": "dist/index.js",
"module": "dist/upup.esm.js",
"types": "dist/index.d.ts",
"typings": "dist/index.d.ts",
"files": [
"dist",
Expand Down Expand Up @@ -46,7 +47,8 @@
"analyze": "size-limit --why",
"storybook": "storybook dev -p 6006",
"build-storybook": "storybook build",
"ci": "pnpm run prettier-check && pnpm run build "
"ci": "pnpm run prettier-check && pnpm run build",
"release": "pnpm run prettier-check && pnpm run build && changeset publish"
},
"peerDependencies": {
"react": "^18.2.0",
Expand Down Expand Up @@ -75,6 +77,7 @@
"@babel/preset-env": "^7.21.4",
"@babel/preset-react": "^7.18.6",
"@babel/preset-typescript": "^7.21.4",
"@changesets/cli": "^2.26.2",
"@size-limit/preset-small-lib": "^8.2.4",
"@storybook/addon-essentials": "^7.1.1",
"@storybook/addon-info": "^5.3.21",
Expand Down
Loading

0 comments on commit 2b69825

Please sign in to comment.