Skip to content

docs: record Tier 3 as done and log Stage 2 #7

docs: record Tier 3 as done and log Stage 2

docs: record Tier 3 as done and log Stage 2 #7

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:16
env:
POSTGRES_USER: api
POSTGRES_PASSWORD: api_test
POSTGRES_DB: api_test
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Build
run: go build -v ./...
- name: Vet
run: go vet ./...
- name: Install postgresql-client
run: sudo apt-get update && sudo apt-get install -y postgresql-client
- name: Run migrations
run: |
for f in migrations/*.up.sql; do
psql "$DATABASE_URL" -f "$f"
done
env:
DATABASE_URL: postgres://api:api_test@localhost:5432/api_test?sslmode=disable
- name: Start server and run smoke test
run: |
go build -o api_server .
./api_server &
sleep 2
cd internal/smoketest && go run . http://localhost:8080
env:
DATABASE_URL: postgres://api:api_test@localhost:5432/api_test?sslmode=disable
JWT_SECRET: ci-test-secret-not-for-prod
CORS_ORIGINS: http://localhost:5173
PORT: 8080
- name: Create Release
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
name: Release ${{ github.ref_name }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}