name: Publish run-name: Publish on: push: branches: - master jobs: publish: runs-on: ubuntu-latest steps: - name: Setup Bun uses: oven-sh/setup-bun@v2 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - name: Login to Container Registry uses: docker/login-action@v4 with: registry: docker.valverde.cloud username: ${{ secrets.DOCKER_REGISTRY_USERNAME }} password: ${{ secrets.DOCKER_REGISTRY_PASSWORD }} - name: Clone repo uses: actions/checkout@v6 - name: Install dependencies run: bun install --frozen-lockfile - name: Lint TypeScript run: bun lint:tsc - name: Lint Biome run: bun lint:biome - name: Test run: bun run test - name: Build run: bun run build - name: Publish effect-view uses: JS-DevTools/npm-publish@v4 with: package: packages/effect-view access: public token: ${{ secrets.NPM_TOKEN }} registry: https://registry.npmjs.org - name: Publish @effect-view/vite-plugin uses: JS-DevTools/npm-publish@v4 with: package: packages/vite-plugin access: public token: ${{ secrets.NPM_TOKEN }} registry: https://registry.npmjs.org - name: Publish effect-fc uses: JS-DevTools/npm-publish@v4 with: package: packages/effect-fc access: public token: ${{ secrets.NPM_TOKEN }} registry: https://registry.npmjs.org - name: Clean before Docker build run: | bun clean:cache bun clean:dist bun clean:modules - name: Generate Docker metadata id: meta uses: docker/metadata-action@v5 with: images: | docker.valverde.cloud/thilawyn/effect-view tags: | type=ref,event=branch type=ref,event=tag type=ref,event=pr type=sha flavor: | latest=true - name: Build Docker image uses: docker/build-push-action@v6 with: context: . file: ./Dockerfile push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }}