diff --git a/.changeset/config.json b/.changeset/config.json index ae82eba..30d40e9 100644 --- a/.changeset/config.json +++ b/.changeset/config.json @@ -1,10 +1,13 @@ { "$schema": "https://unpkg.com/@changesets/config@3.0.2/schema.json", - "changelog": "@changesets/cli/changelog", + "changelog": [ + "@changesets/changelog-github", + { "repo": "damianricobelli/stepperize" } + ], "commit": false, "fixed": [], "linked": [], - "access": "restricted", + "access": "public", "baseBranch": "main", "updateInternalDependencies": "patch", "ignore": [] diff --git a/.github/workflows/changelog-release.yml b/.github/workflows/changelog-release.yml deleted file mode 100644 index dd4ae6e..0000000 --- a/.github/workflows/changelog-release.yml +++ /dev/null @@ -1,46 +0,0 @@ -name: Changelog and Release - -on: - push: - branches: - - main - tags: - - 'v*.*.*' - paths: - - 'packages/react/**' - -concurrency: ${{ github.workflow }}-${{ github.ref }} - -jobs: - changelog: - runs-on: ubuntu-latest - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Set up Node.js - uses: actions/setup-node@v4 - with: - node-version: '18' - - - name: Cache pnpm modules - uses: actions/cache@v4 - with: - path: | - **/node_modules - **/.pnpm-store - key: pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} - restore-keys: | - pnpm- - - - name: Install pnpm - run: npm install -g pnpm - - - name: Install dependencies - run: pnpm install - - - name: Generate changelog and version - run: pnpm version-packages - env: - GH_ACTION_TOKEN: ${{ secrets.GH_ACTION_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/release.yml similarity index 58% rename from .github/workflows/npm-publish.yml rename to .github/workflows/release.yml index 65e2562..7b14169 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/release.yml @@ -4,17 +4,17 @@ on: push: branches: - main - tags: - - 'v*.*.*' - paths: - - 'packages/react/**' concurrency: ${{ github.workflow }}-${{ github.ref }} +permissions: {} jobs: - publish: + release: + permissions: + contents: write + issues: write + pull-requests: write runs-on: ubuntu-latest - steps: - name: Checkout repository uses: actions/checkout@v4 @@ -44,21 +44,13 @@ jobs: run: pnpm build working-directory: packages/react - - name: Set up npm token - run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc - - - name: Bump version with Changesets - run: pnpm version-packages - - - name: Commit the version bump - run: | - git config --global user.name "github-actions[bot]" - git config --global user.email "github-actions[bot]@users.noreply.github.com" - git add . - git commit -m "ci: bump version [skip ci]" - git push origin main - - - name: Publish to npm + - name: Create Release Pull Request or Publish to npm + uses: changesets/action@v1 + with: + publish: pnpm release + version: pnpm version + commit: "chore: new release" + title: "chore: new release candidate" env: + GH_ACTION_TOKEN: ${{ secrets.GH_ACTION_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - run: pnpm release diff --git a/package.json b/package.json index 960aaff..8690601 100644 --- a/package.json +++ b/package.json @@ -8,8 +8,8 @@ "clean": "turbo run clean && rm -rf node_modules .pnpm-store .turbo", "format-and-lint": "biome check .", "format-and-lint:fix": "biome check . --write", - "version-packages": "pnpm changeset version", - "release": "pnpm changeset publish" + "version": "changeset version", + "release": "changeset publish" }, "devDependencies": { "@biomejs/biome": "1.8.3",