name: ZITADEL Release on: #pull_request: push: permissions: contents: write jobs: Build: runs-on: ubuntu-20.04 steps: - name: Source checkout uses: actions/checkout@v2 - name: Semantic Release id: semantic uses: cycjimmy/semantic-release-action@v2 with: dry_run: true semantic_version: 19.0.2 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Set up Go uses: actions/setup-go@v2 with: go-version: 1.17 - name: Set up QEMU uses: docker/setup-qemu-action@v1 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v1 with: driver: docker install: true - name: Run GoReleaser Snapshot if: ${{ !startsWith(github.ref, 'refs/tags/') }} uses: goreleaser/goreleaser-action@v2 with: distribution: goreleaser version: v1.5.0 args: release --snapshot env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Run GoReleaser Release on tag if: ${{ startsWith(github.ref, 'refs/tags/') }} uses: goreleaser/goreleaser-action@v2 with: distribution: goreleaser version: v1.5.0 args: release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - uses: actions/upload-artifact@v2 name: Upload goreleaser dist with: name: goreleaser-dist path: .artifacts/goreleaser - uses: actions/upload-artifact@v2 name: Upload gRPC clients with: name: grpc-clients path: .artifacts/grpc - uses: actions/upload-artifact@v2 name: Upload compiled console with: name: console path: .artifacts/console - uses: codecov/codecov-action@v1 name: Upload go coverage with: files: .artifacts/codecov/profile.cov name: go-codecov