diff --git a/.changeset/config.json b/.changeset/config.json new file mode 100644 index 0000000..625305e --- /dev/null +++ b/.changeset/config.json @@ -0,0 +1,16 @@ +{ + "$schema": "https://unpkg.com/@changesets/config@3.1.1/schema.json", + "changelog": [ + "@changesets/changelog-github", + { + "repo": "johnie/esbuild-coffeescript" + } + ], + "commit": true, + "fixed": [], + "linked": [], + "access": "public", + "baseBranch": "master", + "updateInternalDependencies": "patch", + "ignore": [] +} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..3f3da59 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,65 @@ +name: Release + +on: + push: + branches: + - master + +concurrency: ${{ github.workflow }}-${{ github.ref }} + +jobs: + test: + name: Test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Install PNPM + uses: pnpm/action-setup@v4 + with: + version: latest + run_install: false + + - name: Setup Node and cache pnpm + uses: actions/setup-node@v4 + with: + node-version: 24 + cache: "pnpm" + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + - name: Run CI + run: pnpm run ci + + release: + name: Release + runs-on: ubuntu-latest + if: ${{ github.ref == 'refs/heads/main' }} + needs: [test] + steps: + - uses: actions/checkout@v4 + + - name: Install PNPM + uses: pnpm/action-setup@v4 + with: + version: latest + run_install: false + + - name: Setup Node and cache pnpm + uses: actions/setup-node@v4 + with: + node-version: 24 + cache: "pnpm" + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + - name: Create Release Pull Request or Publish to npm + id: changesets + uses: changesets/action@v1 + with: + publish: pnpm run release + env: + GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }}