name: Release on: push: branches: - master workflow_dispatch: jobs: release: name: Publish & Deploy if: github.event_name == 'push' && github.repository_owner == 'vanilla-extract-css' runs-on: ubuntu-latest permissions: id-token: write env: CI: true steps: - name: Checkout Repo uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: fetch-depth: 0 token: ${{ secrets.VANILLA_EXTRACT_CI_GITHUB_TOKEN }} persist-credentials: false - name: Set up PNPM uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0 - name: Set up Node.js uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 with: node-version-file: '.nvmrc' cache: 'pnpm' - name: Install Dependencies run: pnpm install - name: Create release PR or publish to npm uses: changesets/action@ae32849d5ba541f9ae29e40e22a623bc13562f51 # v2.1.2 with: version-script: pnpm run version publish-script: pnpm release github-token: ${{ secrets.VANILLA_EXTRACT_CI_GITHUB_TOKEN }} snapshot: name: Publish snapshot version if: github.event_name == 'workflow_dispatch' && github.repository_owner == 'vanilla-extract-css' runs-on: ubuntu-latest permissions: id-token: write env: CI: true steps: - name: Checkout Repo uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: fetch-depth: 0 token: ${{ secrets.VANILLA_EXTRACT_CI_GITHUB_TOKEN }} persist-credentials: false - name: Set up PNPM uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0 - name: Set up Node.js uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 with: node-version-file: '.nvmrc' cache: 'pnpm' - name: Install Dependencies run: pnpm install - name: Publish uses: seek-oss/changesets-snapshot@56b8b82b8e45fd725daa2890453dfa0fa28f9eb0 # v1.0.0 with: pre-publish: pnpm prepare-release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}