Release v0.30.0 #1958
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: | |
| pull_request: | |
| branches: [main] | |
| paths: | |
| - .github/workflows/ci.yml | |
| - shard.yml | |
| - shard.lock | |
| - Dockerfile | |
| - "**/*.cr" | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| inputs: | |
| logLevel: | |
| description: manual run | |
| required: false | |
| default: "" | |
| jobs: | |
| build-crystal: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| crystal-version: [1.19.0, 1.20.0] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: crystal-lang/install-crystal@v1 | |
| with: | |
| crystal: ${{ matrix.crystal-version }} | |
| - name: Install dependencies | |
| run: shards install | |
| - name: Build | |
| run: shards build | |
| build-docker: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| arch: [linux/amd64, linux/arm64] | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Install cosign | |
| if: github.event_name != 'pull_request' | |
| uses: sigstore/[email protected] | |
| with: | |
| cosign-release: v2.1.1 | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v4 | |
| - name: Setup Docker buildx | |
| uses: docker/setup-buildx-action@v4 | |
| - name: Extract Docker metadata | |
| id: meta | |
| uses: docker/metadata-action@v6 | |
| with: | |
| images: ghcr.io/${{ github.repository }} | |
| - name: Build Docker image | |
| id: build-and-push | |
| uses: docker/build-push-action@v7 | |
| with: | |
| context: . | |
| push: false | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| platforms: ${{ matrix.arch }} | |
| cache-from: type=gha,scope=${{ matrix.arch }} | |
| cache-to: type=gha,mode=max,scope=${{ matrix.arch }} | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Run Ameba linter | |
| uses: crystal-ameba/github-action@master | |
| tests: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| crystal-version: [1.19.0, 1.20.0] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: crystal-lang/install-crystal@v1 | |
| with: | |
| crystal: ${{ matrix.crystal-version }} | |
| - name: Install dependencies | |
| run: shards install | |
| - name: Run unit tests | |
| run: crystal spec spec/unit_test | |
| - name: Run functional tests | |
| run: crystal spec spec/functional_test | |
| build-snapcraft: | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' || github.event_name == 'workflow_dispatch' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| platform: [amd64] | |
| steps: | |
| - name: Check out Git repository | |
| uses: actions/checkout@v6 | |
| - name: Build snapcraft package | |
| uses: canonical/action-build@v1 | |
| id: build |