chore: release v0.12.0 #115
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - 'v*' | |
| pull_request: | |
| permissions: | |
| contents: read | |
| packages: write | |
| env: | |
| GHCR_REGISTRY: ghcr.io | |
| GHCR_IMAGE_NAME: tinyrack-net/tinyauth | |
| DOCKERHUB_REGISTRY: docker.io | |
| DOCKERHUB_USERNAME: tinyrack | |
| DOCKERHUB_IMAGE_NAME: tinyrack/tinyauth | |
| jobs: | |
| build: | |
| name: Build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v6.0.3 | |
| - name: Set up pnpm | |
| uses: pnpm/action-setup@v6.0.9 | |
| with: | |
| version: 10.33.2 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v6.4.0 | |
| with: | |
| cache: pnpm | |
| node-version: 24 | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Build | |
| run: pnpm build | |
| - name: Lint | |
| run: pnpm biome check . | |
| - name: Upload dist artifacts | |
| uses: actions/upload-artifact@v7.0.1 | |
| with: | |
| name: dist | |
| path: packages/*/dist | |
| test: | |
| name: Test | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v6.0.3 | |
| - name: Set up pnpm | |
| uses: pnpm/action-setup@v6.0.9 | |
| with: | |
| version: 10.33.2 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v6.4.0 | |
| with: | |
| cache: pnpm | |
| node-version: 24 | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Download dist artifacts | |
| uses: actions/download-artifact@v8.0.1 | |
| with: | |
| name: dist | |
| - name: Backend tests | |
| run: pnpm --filter @tinyrack/tinyauth-server test | |
| - name: Install Playwright browsers for frontend unit tests | |
| run: pnpm --filter @tinyrack/tinyauth-frontend exec playwright install --with-deps chromium firefox | |
| - name: Frontend unit tests | |
| run: pnpm --filter @tinyrack/tinyauth-frontend test:unit | |
| - name: Standalone tests | |
| run: pnpm --filter @tinyrack/tinyauth-standalone test | |
| - name: Standalone dist tests | |
| run: pnpm --filter @tinyrack/tinyauth-standalone test:dist | |
| - name: Frontend smoke E2E | |
| run: pnpm --filter @tinyrack/tinyauth-frontend run test:e2e:smoke | |
| windows-compatibility: | |
| name: Windows Compatibility | |
| needs: build | |
| runs-on: windows-latest | |
| steps: | |
| - name: Disable Git CRLF conversion | |
| run: git config --global core.autocrlf false | |
| - name: Check out repository | |
| uses: actions/checkout@v6.0.3 | |
| - name: Set up pnpm | |
| uses: pnpm/action-setup@v6.0.9 | |
| with: | |
| version: 10.33.2 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v6.4.0 | |
| with: | |
| cache: pnpm | |
| node-version: 24 | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Build | |
| run: pnpm build | |
| - name: Lint | |
| run: pnpm biome check . | |
| - name: Backend tests | |
| run: pnpm --filter @tinyrack/tinyauth-server test --run | |
| - name: Tools tests | |
| run: pnpm --filter @tinyrack/tinyauth-tools test --run | |
| - name: Standalone tests | |
| run: pnpm --filter @tinyrack/tinyauth-standalone test --run | |
| - name: Install Playwright browsers for frontend tests | |
| run: pnpm --filter @tinyrack/tinyauth-frontend exec playwright install chromium firefox | |
| - name: Frontend unit tests | |
| run: pnpm --filter @tinyrack/tinyauth-frontend test:unit --run | |
| - name: Frontend smoke E2E | |
| run: pnpm --filter @tinyrack/tinyauth-frontend run test:e2e:smoke | |
| docker-build: | |
| name: Docker Build | |
| needs: test | |
| if: github.event_name == 'push' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v6.0.3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v4.1.0 | |
| - name: Build Docker image | |
| uses: docker/build-push-action@v7.2.0 | |
| with: | |
| context: . | |
| file: ./packages/standalone/Dockerfile | |
| push: false | |
| load: true | |
| platforms: linux/amd64 | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| docker-push: | |
| name: Docker Push | |
| needs: docker-build | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v6.0.3 | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v4.1.0 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v4.1.0 | |
| - name: Validate Docker Hub configuration | |
| env: | |
| DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} | |
| run: | | |
| if [ -z "$DOCKERHUB_TOKEN" ]; then | |
| echo "::error::Missing Docker Hub configuration. Set DOCKERHUB_TOKEN as a repository secret." | |
| exit 1 | |
| fi | |
| - name: Log in to GitHub Container Registry | |
| uses: docker/login-action@v4.2.0 | |
| with: | |
| registry: ${{ env.GHCR_REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Log in to Docker Hub | |
| uses: docker/login-action@v4.2.0 | |
| with: | |
| registry: ${{ env.DOCKERHUB_REGISTRY }} | |
| username: ${{ env.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Extract Docker metadata | |
| id: metadata | |
| uses: docker/metadata-action@v6.1.0 | |
| with: | |
| images: | | |
| ${{ env.GHCR_REGISTRY }}/${{ env.GHCR_IMAGE_NAME }} | |
| ${{ env.DOCKERHUB_REGISTRY }}/${{ env.DOCKERHUB_IMAGE_NAME }} | |
| flavor: | | |
| latest=auto | |
| tags: | | |
| type=semver,pattern={{version}} | |
| type=semver,pattern={{major}}.{{minor}},enable=${{ !contains(github.ref_name, '-') }} | |
| type=semver,pattern={{major}},enable=${{ !contains(github.ref_name, '-') }} | |
| type=sha | |
| labels: | | |
| org.opencontainers.image.source=https://github.com/${{ github.repository }} | |
| - name: Build and push Docker image | |
| uses: docker/build-push-action@v7.2.0 | |
| with: | |
| context: . | |
| file: ./packages/standalone/Dockerfile | |
| push: true | |
| platforms: linux/amd64,linux/arm64 | |
| tags: ${{ steps.metadata.outputs.tags }} | |
| labels: ${{ steps.metadata.outputs.labels }} | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| npm-publish: | |
| name: Publish to npm | |
| needs: test | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| id-token: write | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v6.0.3 | |
| - name: Set up pnpm | |
| uses: pnpm/action-setup@v6.0.9 | |
| with: | |
| version: 10.33.2 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v6.4.0 | |
| with: | |
| cache: pnpm | |
| node-version: 24 | |
| registry-url: https://registry.npmjs.org | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Build | |
| run: pnpm build | |
| - name: Copy README to package | |
| run: cp readme.md packages/server/readme.md | |
| - name: Publish | |
| run: pnpm publish --filter @tinyrack/tinyauth-server --access public --no-git-checks |