Skip to content

Update build.yml to include YAML file paths #426

Update build.yml to include YAML file paths

Update build.yml to include YAML file paths #426

Workflow file for this run

name: dotnet build
on:
push:
branches: [ main ]
paths:
- '**.cs'
- '**.csproj'
- '**.yml'
pull_request:
paths:
- '**.cs'
- '**.csproj'
- '**.yml'
workflow_dispatch:
env:
REPODB_MYSQL_CONSTR_SYS: "Server=127.0.0.1;Port=43306;Database=sys;User ID=root;Password=ddd53e85-b15e-4da8-91e5-a7d3b00a0ab2;"
REPODB_ORACLE_CONSTR_MASTER: "Data Source=127.0.0.1:41521/FREEPDB1;User Id=system;Password=oracle;"
REPODB_POSTGRESQL_CONSTR_POSTGRESDB: "Server=127.0.0.1;Port=45432;Database=postgres;User Id=postgres;Password=ddd53e85-b15e-4da8-91e5-a7d3b00a0ab2;"
REPODB_SQLSERVER_CONSTR_MASTER: "Server=tcp:127.0.0.1,41433;Database=master;User ID=sa;Password=ddd53e85-b15e-4da8-91e5-a7d3b00a0ab2;TrustServerCertificate=True;"
jobs:
build:
runs-on: ubuntu-latest
# Services. See docker-compose.yml
services:
mysql:
image: mysql:latest
ports:
- 127.0.0.1:43306:3306
env:
MYSQL_ROOT_PASSWORD: ddd53e85-b15e-4da8-91e5-a7d3b00a0ab2
oracle:
image: gvenzl/oracle-free:23-slim-faststart
ports:
- 127.0.0.1:41521:1521
- 127.0.0.1:45500:5500
env:
ORACLE_PASSWORD: "oracle"
ORACLE_ALLOW_REMOTE: "true"
postgresql:
image: postgres:17-alpine
ports:
- 127.0.0.1:45432:5432
env:
POSTGRES_PASSWORD: ddd53e85-b15e-4da8-91e5-a7d3b00a0ab2
sqlserver:
image: mcr.microsoft.com/mssql/server:2025-latest
ports:
- 127.0.0.1:41433:1433
env:
ACCEPT_EULA: true
MSSQL_SA_PASSWORD: ddd53e85-b15e-4da8-91e5-a7d3b00a0ab2
steps:
- name: Check out repository code
uses: actions/checkout@v6
- name: Setup DotNet Versions
uses: actions/setup-dotnet@v5
with:
dotnet-version: |
8.0.x
9.0.x
10.0.x
- name: build
run: dotnet build -c Release
- name: Run tests for .Net 10.0
run: dotnet test -c Release -f net10.0 --no-build --report-github --report-github-summary-include-passed=false
- name: Set version variables
id: version
run: |
DATE=$(date +'%Y.%02m%02d')
BUILD_NUM=$(printf "%d" $(( ${{ github.run_number }} % 60000 )))
echo "version=1.${DATE}.${BUILD_NUM}" >> $GITHUB_OUTPUT
- name: Pack packages
run: dotnet pack -c Release -p:Version="${{ steps.version.outputs.version }}" -p:PackagePrefix=AmpScm. -o release
- name: Package nupkg files
uses: actions/upload-artifact@v4
with:
name: release
path: release/*nupkg