Skip to content

Commit

Permalink
chore: Add changesets automation
Browse files Browse the repository at this point in the history
  • Loading branch information
LekoArts committed Sep 30, 2023
1 parent 92c1717 commit d78b7af
Show file tree
Hide file tree
Showing 8 changed files with 1,248 additions and 35 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)
14 changes: 14 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"$schema": "https://unpkg.com/@changesets/config@2.3.1/schema.json",
"changelog": [
"@changesets/changelog-github",
{ "repo": "LekoArts/secco" }
],
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
2 changes: 1 addition & 1 deletion .github/actions/pnpm-install/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ runs:
corepack enable
echo "corepack enabled"
- uses: pnpm/action-setup@v2.2.4
- uses: pnpm/action-setup@v2.4.0
if: ${{ inputs.enable-corepack == 'false' }}
with:
run_install: false
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install dependencies
uses: ./.github/actions/pnpm-install
- name: Build CLI
Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Release
on:
push:
branches:
- main
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install dependencies
uses: ./.github/actions/pnpm-install
- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
commit: 'chore(release): Publish'
title: 'Changesets: Version Packages'
publish: pnpm release
version: pnpm version
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/unit-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install dependencies
uses: ./.github/actions/pnpm-install
- name: Run Vitest
Expand Down
7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@
"lint:fix": "eslint . --fix",
"test": "vitest run",
"test:watch": "vitest watch",
"typecheck": "tsc --noEmit"
"typecheck": "tsc --noEmit",
"changeset": "changeset",
"version": "changeset version",
"release": "pnpm build && changeset publish"
},
"dependencies": {
"chokidar": "^3.5.3",
Expand All @@ -66,6 +69,8 @@
},
"devDependencies": {
"@antfu/eslint-config": "1.0.0-beta.13",
"@changesets/changelog-github": "^0.4.8",
"@changesets/cli": "^2.26.2",
"@total-typescript/ts-reset": "^0.5.1",
"@types/fs-extra": "^11.0.2",
"@types/lodash-es": "^4.17.9",
Expand Down
Loading

0 comments on commit d78b7af

Please # to comment.