Skip to content

Commit

Permalink
Use changeset
Browse files Browse the repository at this point in the history
  • Loading branch information
pontusab committed Dec 29, 2024
1 parent 77d06f4 commit 1566daa
Show file tree
Hide file tree
Showing 7 changed files with 57 additions and 60 deletions.
78 changes: 18 additions & 60 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
on:
push:
branches:
- main
# branches:
# - main

jobs:
test:
Expand Down Expand Up @@ -54,37 +54,16 @@ jobs:
- name: Build
working-directory: packages/cli
run: bun run build
- name: Get version
id: get_version
working-directory: packages/cli
run: |
CURRENT_VERSION=$(node -p "require('./package.json').version")
echo "version=${CURRENT_VERSION}" >> $GITHUB_OUTPUT
echo "new_version=$(npx semver ${CURRENT_VERSION} -i patch)" >> $GITHUB_OUTPUT
- name: Update version
working-directory: packages/cli
run: npm version ${{ steps.get_version.outputs.new_version }} --no-git-tag-version
- name: Commit package.json changes
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git pull origin main
git add packages/cli/package.json
git commit -m "chore: bump languine to v${{ steps.get_version.outputs.new_version }}"
git push
- name: Create Release
uses: softprops/action-gh-release@v1
- name: Create and publish versions
uses: changesets/action@v1
with:
tag_name: v${{ steps.get_version.outputs.new_version }}
name: Release (languine) v${{ steps.get_version.outputs.new_version }}
generate_release_notes: true
- name: Setup NPM Auth
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
- name: Publish to NPM
working-directory: packages/cli
run: npm publish --access public
version: npx changeset version
commit: "chore: update versions"
title: "chore: update versions"
publish: npx changeset publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

publish-react-email:
name: Publish React Email
Expand All @@ -106,34 +85,13 @@ jobs:
- name: Build
working-directory: packages/react-email
run: bun run build
- name: Get version
id: get_version
working-directory: packages/react-email
run: |
CURRENT_VERSION=$(node -p "require('./package.json').version")
echo "version=${CURRENT_VERSION}" >> $GITHUB_OUTPUT
echo "new_version=$(npx semver ${CURRENT_VERSION} -i patch)" >> $GITHUB_OUTPUT
- name: Update version
working-directory: packages/react-email
run: npm version ${{ steps.get_version.outputs.new_version }} --no-git-tag-version
- name: Commit package.json changes
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git pull origin main
git add packages/react-email/package.json
git commit -m "chore: bump @languine/react-email to v${{ steps.get_version.outputs.new_version }}"
git push
- name: Create Release
uses: softprops/action-gh-release@v1
- name: Create and publish versions
uses: changesets/action@v1
with:
tag_name: v${{ steps.get_version.outputs.new_version }}
name: Release (@languine/react-email) v${{ steps.get_version.outputs.new_version }}
generate_release_notes: true
- name: Setup NPM Auth
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
- name: Publish to NPM
working-directory: packages/react-email
run: npm publish --access public
version: npx changeset version
commit: "chore: update versions"
title: "chore: update versions"
publish: npx changeset publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
Binary file modified bun.lockb
Binary file not shown.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"packageManager": "[email protected]",
"devDependencies": {
"@biomejs/biome": "^1.9.4",
"@changesets/cli": "^2.27.11",
"@types/bun": "^1.1.14",
"@types/node": "^22.10.2",
"turbo": "2.3.3",
Expand Down
8 changes: 8 additions & 0 deletions packages/cli/.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 packages/cli/.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/changelog-github", { "repo": "midday-ai/languine" }],
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
8 changes: 8 additions & 0 deletions packages/react-email/.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 packages/react-email/.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/changelog-github", { "repo": "midday-ai/languine" }],
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}

0 comments on commit 1566daa

Please sign in to comment.