Update packages (#597) #34
Workflow file for this run
This file contains 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: Publish | |
on: | |
push: | |
tags: | |
- v* | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
DOTNET_NOLOGO: true | |
DOTNET_CLI_TELEMETRY_OPTOUT: 1 | |
POSTGRESQL_CONNECTION_STRING: Server=localhost;Port=5432;Database=yessql;User Id=root;Password=Password12!; | |
MYSQL_CONNECTION_STRING: server=localhost;uid=root;pwd=Password12!;database=yessql; | |
SQLSERVER_2019_CONNECTION_STRING: Server=localhost;Database=tempdb;User Id=sa;Password=Password12!;Encrypt=False; | |
services: | |
postgres: | |
image: postgres:11 | |
env: | |
POSTGRES_USER: root | |
POSTGRES_PASSWORD: Password12! | |
POSTGRES_DB: yessql | |
ports: | |
- 5432:5432 | |
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | |
mysql: | |
image: mysql:8 | |
ports: | |
- 3306:3306 | |
env: | |
MYSQL_DATABASE: yessql | |
MYSQL_ROOT_PASSWORD: Password12! | |
options: --health-cmd "mysqladmin ping" --health-interval 10s --health-timeout 5s --health-retries 5 | |
mssql: | |
image: mcr.microsoft.com/mssql/server:2019-latest | |
ports: | |
- 1433:1433 | |
env: | |
ACCEPT_EULA: Y | |
MSSQL_SA_PASSWORD: Password12! | |
steps: | |
- uses: actions/checkout@v3 | |
# Required if the .NET version is not available on the GH Actions images | |
- uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: | | |
8.0.x | |
- name: Get the version | |
id: get_version | |
run: | | |
arrTag=(${GITHUB_REF//\// }) | |
VERSION="${arrTag[2]}" | |
VERSION="${VERSION//v}" | |
echo VERSION:${VERSION} | |
echo ::set-output name=VERSION::${VERSION} | |
shell: bash | |
- name: Build | |
run: dotnet build --configuration Release -p:Version=${{ steps.get_version.outputs.VERSION }} | |
- name: Test - Sqlite .NET 8.0 | |
run: dotnet test --configuration Release --filter YesSql.Tests.SqliteTests --no-restore --no-build --framework net8.0 | |
- name: Test - MySQL .NET 8.0 | |
run: dotnet test --configuration Release --filter YesSql.Tests.MySqlTests --no-restore --no-build --framework net8.0 | |
- name: Test - SQL Server 2019 .NET 8.0 | |
run: dotnet test --configuration release --filter YesSql.Tests.SqlServer2019Tests --no-restore --no-build --framework net8.0 | |
- name: Test - PostgresQL Legacy Identity - No Schema | |
run: dotnet test --configuration release --filter YesSql.Tests.PostgreSqlLegacyIdentityTests --no-restore --no-build --framework net8.0 | |
- name: Test - Sqlite Legacy Identity | |
run: dotnet test --configuration release --filter YesSql.Tests.SqliteLegacyIdentityTests --no-restore --no-build --framework net8.0 | |
- name: Pack | |
run: dotnet pack --output artifacts --configuration Release --no-restore --no-build -p:Version=${{ steps.get_version.outputs.VERSION }} | |
- name: Publish on NuGet | |
run: dotnet nuget push "artifacts/*.nupkg" --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate |