diff --git a/.github/workflows/changeset-dependabot.yml b/.github/workflows/changeset-dependabot.yml new file mode 100644 index 00000000..3d13338e --- /dev/null +++ b/.github/workflows/changeset-dependabot.yml @@ -0,0 +1,15 @@ +name: "Dependabot Changesets" + +on: pull_request + +permissions: + contents: write + pull-requests: write + +jobs: + changesets: + runs-on: ubuntu-latest + if: ${{ github.actor == 'dependabot[bot]' }} + steps: + - name: Dependabot Changesets + uses: feelepxyz/dependabot-changesets@v1 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 90644dd6..5e454f59 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,30 +1,38 @@ -name: Release +name: Changesets on: push: branches: - main -concurrency: ${{ github.workflow }}-${{ github.ref }} -permissions: {} #reset +env: + CI: true + PNPM_CACHE_FOLDER: .pnpm-store jobs: - release: - # IMPORTANT: prevent this action from running on forks - if: github.repository == 'MatthiesenXYZ/astro-ghostcms' - permissions: - contents: write # to create release (changesets/action) - pull-requests: write # to create pull request (changesets/action) - name: Release + version: + timeout-minutes: 15 runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - name: checkout code repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: setup node.js + uses: actions/setup-node@v4 with: node-version: 18 - - run: npm ci - - name: Publish to npm - id: changesets + - name: install pnpm + run: npm i pnpm@latest -g + - name: Setup npmrc + run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc + - name: setup pnpm config + run: pnpm config set store-dir $PNPM_CACHE_FOLDER + - name: install dependencies + run: pnpm install + - name: create and publish versions uses: changesets/action@v1 with: - publish: npm run release + version: pnpm ci:version + commit: "chore: update versions" + title: "chore: update versions" + publish: pnpm changeset publish env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.ACTION_TOKEN }} \ No newline at end of file diff --git a/package.json b/package.json index e8144223..f382902b 100644 --- a/package.json +++ b/package.json @@ -7,8 +7,8 @@ }, "scripts": { "lint": "biome check .", - "changeset": "changeset", - "release": "changeset publish", + "ci:version": "pnpm changeset version", + "vi:publish": "pnpm publish -r", "lint:fix": "biome check --apply .", "playground:dev": "pnpm --filter playground dev", "api:test": "pnpm --filter astro-ghostcms test", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index eee91098..100cf8d9 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -30,7 +30,7 @@ importers: specifier: ^3.0.5 version: 3.0.5 '@matthiesenxyz/astro-ghostcms-theme-default': - specifier: ^0.1.9 + specifier: ^0.1.10 version: link:../astro-ghostcms-theme-default '@resvg/resvg-js': specifier: ^2.6.0 @@ -124,11 +124,11 @@ importers: specifier: ^1.1.8 version: 1.1.8 '@matthiesenxyz/astro-ghostcms': - specifier: ^3.2.1 + specifier: ^3.2.3 version: link:../astro-ghostcms '@matthiesenxyz/astro-ghostcms-rendercontent': - specifier: ^0.0.1 - version: 0.0.1 + specifier: ^0.0.3 + version: link:../astro-ghostcms-rendercontent '@unocss/astro': specifier: ^0.57.7 version: 0.57.7(vite@5.0.12) @@ -185,7 +185,7 @@ importers: specifier: ^5.0.16 version: 5.0.16 '@matthiesenxyz/astro-ghostcms': - specifier: ^3.1.8 + specifier: ^3.2.3 version: link:../astro-ghostcms '@tailwindcss/typography': specifier: ^0.5.10 @@ -219,7 +219,7 @@ importers: packages/astro-ghostcms-theme-default: dependencies: '@matthiesenxyz/astro-ghostcms': - specifier: ^3.1.8 + specifier: ^3.2.3 version: link:../astro-ghostcms astro: specifier: ^4.2.1 @@ -1500,13 +1500,6 @@ packages: globby: 11.1.0 read-yaml-file: 1.1.0 - /@matthiesenxyz/astro-ghostcms-rendercontent@0.0.1: - resolution: {integrity: sha512-2zXmCnAoFHZqvkEuccUY0uN/legpXxn0LzVvERc2w8bjTnOPTB+fQN35fc+OiyFZJEy+jgcvwM76ZA3dVgPayQ==} - dependencies: - entities: 4.5.0 - ultrahtml: 1.5.2 - dev: false - /@nodelib/fs.scandir@2.1.5: resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} engines: {node: '>= 8'}