diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 93803ec..25cac11 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,6 +20,11 @@ jobs: - run: go mod download - run: go install github.com/a-h/templ/cmd/templ@v0.2.648 - run: make generate-templ + - uses: sqlc-dev/setup-sqlc@v3 + with: + sqlc-version: '1.26.0' + - run: sqlc vet + - run: sqlc generate - name: Lint uses: golangci/golangci-lint-action@v3 with: @@ -36,5 +41,9 @@ jobs: - run: go mod download - run: go install github.com/a-h/templ/cmd/templ@v0.2.648 - run: make generate-templ + - uses: sqlc-dev/setup-sqlc@v3 + with: + sqlc-version: '1.26.0' + - run: sqlc generate - name: Test run: go test -race ./... diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 537141a..ec5b10f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -29,6 +29,10 @@ jobs: chmod +x tailwindcss-linux-x64 mv tailwindcss-linux-x64 tailwindcss ./tailwindcss -i ./styles/input.css -o ./dist/assets/css/output@${{ github.event.inputs.version }}.css --minify + - uses: sqlc-dev/setup-sqlc@v3 + with: + sqlc-version: '1.26.0' + - run: sqlc generate - name: Build Application run: go build -o ./app -ldflags="-s -w -X version.Value=${{ github.event.inputs.version }}" - name: Create Tag diff --git a/Dockerfile b/Dockerfile index 0736090..585cdb7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,14 +9,16 @@ RUN curl -sLO https://github.com/tailwindlabs/tailwindcss/releases/latest/downlo && chmod +x tailwindcss-linux-x64 \ && mv tailwindcss-linux-x64 /usr/local/bin/tailwindcss -RUN go install github.com/a-h/templ/cmd/templ@v0.2.648 +RUN go install github.com/a-h/templ/cmd/templ@v0.2.648 \ + && go install github.com/sqlc-dev/sqlc/cmd/sqlc@latest WORKDIR /app COPY ./ /app RUN templ generate -path ./components \ - && tailwindcss -i ./styles/input.css -o ./dist/assets/css/output@${VERSION}.css --minify + && tailwindcss -i ./styles/input.css -o ./dist/assets/css/output@${VERSION}.css --minify \ + && sqlc generate RUN go build -ldflags="-s -w -X version.Value=${VERSION}" -o my-app