Merge branch 'main' of https://github.com/EmptyFlow/PostgreSQL.Migrat… #3
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: CI and Release | |
on: | |
push: | |
branches: [ "main" ] | |
jobs: | |
macos64: | |
runs-on: macos-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install .NET Core | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.0.x | |
- name: Restore dependencies | |
run: dotnet restore src/PostgreSQL.Migrations.Console/Migrations.Console.csproj | |
- name: Publish x64 application | |
run: dotnet publish -r osx-x64 -c Release --self-contained true src/PostgreSQL.Migrations.Console/Migrations.Console.csproj | |
- name: Publish arm64 application | |
run: dotnet publish -r osx-arm64 -c Release --self-contained true src/PostgreSQL.Migrations.Console/Migrations.Console.csproj | |
- name: Upload x64 artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: macos64 | |
path: src/PostgreSQL.Migrations.Console/bin/Release/net8.0/osx-x64/publish/dbmigrations | |
- name: Upload arm64 artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: macosarm64 | |
path: src/PostgreSQL.Migrations.Console/bin/Release/net8.0/osx-arm64/publish/dbmigrations | |
windows64: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install .NET Core | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.0.x | |
- name: Restore dependencies | |
run: dotnet restore src/PostgreSQL.Migrations.Console/Migrations.Console.csproj | |
- name: Publish x64 application | |
run: dotnet publish -r win-x64 -c Release -p:PublishAot=false --self-contained true -p:PublishSingleFile=true src/PostgreSQL.Migrations.Console/Migrations.Console.csproj | |
- name: Publish arm64 application | |
run: dotnet publish -r win-arm64 -c Release --self-contained true src/PostgreSQL.Migrations.Console/Migrations.Console.csproj | |
- name: Upload x64 artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: windows64 | |
path: src/PostgreSQL.Migrations.Console/bin/Release/net8.0/win-x64/publish/dbmigrations.exe | |
- name: Upload arm64 artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: windowsarm64 | |
path: src/PostgreSQL.Migrations.Console/bin/Release/net8.0/win-arm64/publish/dbmigrations.exe | |
linux64: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install .NET Core | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.0.x | |
- name: update cache | |
run: sudo apt-get update -qq | |
- name: apt-update | |
run: sudo apt-get install -y --no-install-recommends qemu qemu-user-static binfmt-support debootstrap binutils-arm-linux-gnueabihf binutils-aarch64-linux-gnu binutils-arm-linux-gnueabi libstdc++-12-dev clang-12 | |
- name: Publish x64 application | |
run: dotnet publish -r linux-x64 -c Release --self-contained true src/PostgreSQL.Migrations.Console/Migrations.Console.csproj | |
- name: Publish arm x64 application | |
run: dotnet publish -r linux-arm64 -c Release -p:PublishAot=false --self-contained true -p:PublishSingleFile=true src/PostgreSQL.Migrations.Console/Migrations.Console.csproj | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: linux64 | |
path: src/PostgreSQL.Migrations.Console/bin/Release/net8.0/linux-x64/publish/dbmigrations | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: linuxarm64 | |
path: src/PostgreSQL.Migrations.Console/bin/Release/net8.0/linux-arm64/publish/dbmigrations |