diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c03a740..cc7a2f7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,7 +1,7 @@ on: push: - branches: - - main + # branches: + # - main jobs: test: @@ -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 @@ -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 }} diff --git a/bun.lockb b/bun.lockb index 78367a6..dfdb767 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index 979f4ef..0647c9f 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,7 @@ "packageManager": "bun@1.1.42", "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", diff --git a/packages/cli/.changeset/README.md b/packages/cli/.changeset/README.md new file mode 100644 index 0000000..e5b6d8d --- /dev/null +++ b/packages/cli/.changeset/README.md @@ -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) diff --git a/packages/cli/.changeset/config.json b/packages/cli/.changeset/config.json new file mode 100644 index 0000000..e59e09f --- /dev/null +++ b/packages/cli/.changeset/config.json @@ -0,0 +1,11 @@ +{ + "$schema": "https://unpkg.com/@changesets/config@3.0.5/schema.json", + "changelog": ["@changesets/changelog-github", { "repo": "midday-ai/languine" }], + "commit": false, + "fixed": [], + "linked": [], + "access": "public", + "baseBranch": "main", + "updateInternalDependencies": "patch", + "ignore": [] +} diff --git a/packages/react-email/.changeset/README.md b/packages/react-email/.changeset/README.md new file mode 100644 index 0000000..e5b6d8d --- /dev/null +++ b/packages/react-email/.changeset/README.md @@ -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) diff --git a/packages/react-email/.changeset/config.json b/packages/react-email/.changeset/config.json new file mode 100644 index 0000000..e59e09f --- /dev/null +++ b/packages/react-email/.changeset/config.json @@ -0,0 +1,11 @@ +{ + "$schema": "https://unpkg.com/@changesets/config@3.0.5/schema.json", + "changelog": ["@changesets/changelog-github", { "repo": "midday-ai/languine" }], + "commit": false, + "fixed": [], + "linked": [], + "access": "public", + "baseBranch": "main", + "updateInternalDependencies": "patch", + "ignore": [] +}