declare_schema 0.0.14

CLI / Library for Postgres schema migrations
Documentation
name: Main Branch Deploy

on:
  push:
    branches:
      - main

jobs:

  rust_release:
    runs-on: nixos-runner
    steps:

      - name: Checkout repository
        uses: actions/checkout@v6
        with:
          fetch-depth: 0
          token: ${{ secrets.RELEASE_PLZ_TOKEN }}

      - name: Set Git account
        run: |
          git config user.name "forgejo-actions[bot]"
          git config user.email "forgejo-actions[bot]@example.com"
          BARE_HOST="${FORGEJO_SERVER_URL#https://}"
          BARE_HOST="${BARE_HOST#http://}"
          git config --global url."https://forgejo-actions[bot]:${{ secrets.RELEASE_PLZ_TOKEN }}@${BARE_HOST}".insteadOf "${FORGEJO_SERVER_URL}"

      - name: Run release-plz
        uses: philipcristiano/release-plz-action@main
        env:
          GITHUB_TOKEN: ${{ secrets.RELEASE_PLZ_TOKEN }}
          CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}
          SQLX_OFFLINE: true
        with:
          VERBOSE: true

  flake:
    runs-on: nixos-runner
    steps:
      - uses: actions/checkout@v6
      - name: Build
        env:
          SQLX_OFFLINE: true
        run: nix develop --command cargo build

  postgres_18:
    services:
      pgsql:
        image: postgres:18
        env:
          POSTGRES_DB: declare-schema
          POSTGRES_PASSWORD: declare-schema
          POSTGRES_USER: declare-schema
        options: >-
          --health-cmd pg_isready
          --health-interval 10s
          --health-timeout 5s
          --health-retries 5

    runs-on: nixos-runner
    steps:
      - uses: actions/checkout@v6
      - name: Build
        env:
          DATABASE_URL: postgres://declare-schema:declare-schema@pgsql/declare-schema?sslmode=disable
        run: nix develop --command cargo test

  postgres_17:
    services:
      pgsql:
        image: postgres:17
        env:
          POSTGRES_DB: declare-schema
          POSTGRES_PASSWORD: declare-schema
          POSTGRES_USER: declare-schema
        options: >-
          --health-cmd pg_isready
          --health-interval 10s
          --health-timeout 5s
          --health-retries 5

    runs-on: nixos-runner
    steps:
      - uses: actions/checkout@v6
      - name: Build
        env:
          DATABASE_URL: postgres://declare-schema:declare-schema@pgsql/declare-schema?sslmode=disable
        run: nix develop --command cargo test