diff --git a/.github/workflows/.build.yml b/.github/workflows/.build.yml new file mode 100644 index 0000000..9f2bdcf --- /dev/null +++ b/.github/workflows/.build.yml @@ -0,0 +1,57 @@ +name: Build UnityDataTool + +on: + workflow_dispatch: + inputs: + environment: + description: 'Build environment' + default: 'release' + required: true + type: choice + options: + - debug + - release + push: + branches: + - main + +env: + environment: ${{ inputs.environment || 'release' }} + +jobs: + build: + strategy: + matrix: + os: [windows, macos] + arch: [x64, arm64] + exclude: + - os: windows + arch: arm64 + - os: macos + arch: x64 + + runs-on: ${{ matrix.os }}-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 9.0.x + + - name: Publish UnityDataTool (${{ matrix.os }}-${{ matrix.arch }}-${{ env.environment }}) + run: > + dotnet publish UnityDataTool + -c ${{ env.environment }} + -a ${{ matrix.arch }} + -p:PublishSingleFile=true + -p:UseAppHost=true + -o publish/${{ matrix.os }}/${{ matrix.arch }}-${{ env.environment }} + + - name: Upload artifact + uses: actions/upload-artifact@v4 + with: + name: UnityDataTool-${{ matrix.os }}-${{ matrix.arch }}-${{ env.environment }} + path: publish/${{ matrix.os }}/${{ matrix.arch }}-${{ env.environment }} diff --git a/.gitignore b/.gitignore index aa59e68..399c91d 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ [Tt]emp/ [Ll]og/ [Ll]ogs/ +[Pp]ublish/ **/*.csproj.user **/*.suo