diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index 8f84d76..0000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,43 +0,0 @@ -name: CI - -on: - push: - branches: - - main - pull_request: - -# Automatically cancel in-progress actions on the same branch -concurrency: - group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} - cancel-in-progress: true - -permissions: - contents: write - pull-requests: write - packages: write - id-token: write - -jobs: - build: - name: Build Packages - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: pnpm/action-setup@v4 - - uses: actions/setup-node@v4 - with: - node-version: 20 - cache: "pnpm" - - if: ${{ steps.cache-node.outputs.cache-hit != 'true' }} - run: pnpm install - - run: pnpm run build - - run: pnpm run test - - uses: changesets/action@v1 - if: ${{ github.event_name != 'pull_request' }} - with: - publish: pnpm changeset publish - commit: "[ci] release" - title: "[ci] release" - env: - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml new file mode 100644 index 0000000..a96768c --- /dev/null +++ b/.github/workflows/format.yml @@ -0,0 +1,13 @@ +name: Format + +on: + workflow_dispatch: + push: + branches: + - main + +jobs: + format: + if: github.repository_owner == 'bombshell-dev' + uses: bombshell-dev/automation/.github/workflows/format.yml@main + secrets: inherit diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml new file mode 100644 index 0000000..0136138 --- /dev/null +++ b/.github/workflows/preview.yml @@ -0,0 +1,11 @@ +name: Preview + +on: [push, pull_request] + +jobs: + format: + if: github.repository_owner == 'bombshell-dev' + uses: bombshell-dev/automation/.github/workflows/preview.yml@main + secrets: inherit + with: + publish: '.' diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..1807455 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,13 @@ +name: Publish + +on: + workflow_dispatch: + push: + branches: + - main + +jobs: + publish: + if: github.repository_owner == 'bombshell-dev' + uses: bombshell-dev/automation/.github/workflows/publish.yml@main + secrets: inherit