Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/SantaClaas/material-tailwind.
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104name: Release
on: push: tags: # Release when a version tag is pushed. Tag creation is restricted to # repository admins by the "Tags only by admins" ruleset. - "[0-9]*.[0-9]*.[0-9]*"
permissions: contents: read
jobs: test: runs-on: ubuntu-latest permissions: contents: read steps: - name: Checkout the repository # v7.0.1 uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 with: persist-credentials: false - name: Install pnpm # v6.0.10 # Version comes from the `packageManager` field in package.json uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 - name: Install Node.js # v7.0.0 uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 with: node-version: lts/* package-manager-cache: false # Slower, but no cache poisoning risk - name: Install dependencies run: pnpm install --frozen-lockfile --ignore-scripts - name: Test and ensure dependencies were built as expected run: pnpm test
build: # Separate job so build-time dependencies can't publish runs-on: ubuntu-latest permissions: contents: read steps: - name: Checkout the repository # v7.0.1 uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 with: persist-credentials: false - name: Install pnpm # v6.0.10 # Version comes from the `packageManager` field in package.json uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 - name: Install Node.js # v7.0.0 uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 with: node-version: lts/* package-manager-cache: false - name: Install dependencies run: pnpm install --frozen-lockfile --ignore-scripts - name: Create type definitions run: pnpm create-definitions - name: Upload build artifacts # v7.0.1 uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a with: name: build-artifacts path: dist/ retention-days: 1
publish: # The critical job: no dependencies installed at all runs-on: ubuntu-latest needs: - test - build permissions: contents: read id-token: write # Only this job may authenticate to npm steps: - name: Checkout the repository # v7.0.1 uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 with: persist-credentials: false - name: Download build artifacts # v8.0.1 uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c with: name: build-artifacts path: dist/ - name: Install Node.js # v7.0.0 uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 with: node-version: lts/* package-manager-cache: false - name: Bump ephemeral version to the pushed tag env: TAG: ${{ github.ref_name }} run: npm --no-git-tag-version --ignore-scripts version "$TAG" - name: Stage npm package for approval # Staged, not published: a maintainer approves the release with 2FA run: npm stage publish --ignore-scripts --access public