-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
39 changed files
with
1,904 additions
and
1,655 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,9 +2,9 @@ | |
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json", | ||
"changelog": "@changesets/cli/changelog", | ||
"commit": true, | ||
"fixed": [], | ||
"fixed": [["*"]], | ||
"linked": [], | ||
"access": "restricted", | ||
"access": "public", | ||
"baseBranch": "main", | ||
"updateInternalDependencies": "patch", | ||
"ignore": [] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: Tag and Publish | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
changed: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
pkg: ${{ steps.changes.outputs.pkg }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dorny/paths-filter@v3 | ||
id: changes | ||
with: | ||
filters: | | ||
pkg: | ||
- 'package.json' | ||
check-version: | ||
name: publish | ||
needs: changed | ||
runs-on: ubuntu-latest | ||
if: needs.changed.outputs.pkg == 'true' | ||
steps: | ||
- name: Install Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20.x | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 2 | ||
sparse-checkout-cone-mode: false | ||
sparse-checkout: | | ||
package.json | ||
- id: current_version | ||
name: Read current version | ||
run: | | ||
PACKAGE_VERSION=$(node -e "console.log(JSON.parse(require('fs').readFileSync('package.json').toString()).version)") | ||
echo "::debug::Current version: [${PACKAGE_VERSION}]" | ||
echo "value=${PACKAGE_VERSION}" > $GITHUB_OUTPUT | ||
- name: Checkout previous commit | ||
run: git checkout HEAD^ | ||
|
||
- id: previous_version | ||
name: Read previous version | ||
run: | | ||
PACKAGE_VERSION=$(node -e "console.log(JSON.parse(require('fs').readFileSync('package.json').toString()).version)") | ||
echo "::debug::Previous version: [${PACKAGE_VERSION}]" | ||
echo "value=${PACKAGE_VERSION}" > $GITHUB_OUTPUT | ||
- name: Tag if needed | ||
if: steps.current_version.outputs.value != steps.previous_version.outputs.value | ||
env: | ||
CURRENT_VERSION: ${{ steps.current_version.outputs.value}} | ||
run: | | ||
git config --global user.name "Black Rabbit" | ||
git config --global user.email "[email protected]" | ||
git tag -a v${CURRENT_VERSION} -m "v${CURRENT_VERSION}" | ||
git push origin v${CURRENT_VERSION} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
concurrency: ${{ github.workflow }}-${{ github.ref }} | ||
|
||
jobs: | ||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Clone settings | ||
run: | | ||
git config --global core.eol lf | ||
git config --global core.autocrlf false | ||
- name: Clone repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Reset files | ||
run: | | ||
git clean -ffdx && git reset --hard HEAD | ||
- name: Install PNPM | ||
uses: pnpm/action-setup@v3 | ||
with: | ||
version: 8 | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20.x | ||
cache: 'pnpm' | ||
|
||
- name: Install PNPM | ||
run: corepack enable pnpm | ||
|
||
- name: Install dependencies | ||
run: pnpm install | ||
|
||
- id: versions | ||
name: Check versions | ||
run: | | ||
export HUSKY=0 | ||
PACKAGE_VERSION=$(node -e "console.log(JSON.parse(require('fs').readFileSync('package.json').toString()).version)") | ||
echo "::debug::Current version: [${PACKAGE_VERSION}]" | ||
echo "current_version=${PACKAGE_VERSION}\n" > $GITHUB_OUTPUT | ||
pnpm changeset version | ||
PACKAGE_VERSION=$(node -e "console.log(JSON.parse(require('fs').readFileSync('package.json').toString()).version)") | ||
echo "::debug::Next version: [${PACKAGE_VERSION}]" | ||
echo "next_version=${PACKAGE_VERSION}\n" > $GITHUB_OUTPUT | ||
- name: Create Pull Request | ||
uses: peter-evans/create-pull-request@v6 | ||
with: | ||
title: Release ${{ steps.version.outputs.versions_inline }} | ||
committer: Black Rabbit <[email protected]> | ||
commit-message: "apply changesets" | ||
body: | | ||
Apply changesets to prepare for the next release. | ||
branch: release | ||
delete-branch: true | ||
assignees: wolfulus | ||
|
Oops, something went wrong.