diff --git a/.github/workflows/build-linux.yaml b/.github/workflows/build-linux.yaml index 740aad9..8dc9456 100644 --- a/.github/workflows/build-linux.yaml +++ b/.github/workflows/build-linux.yaml @@ -13,6 +13,7 @@ jobs: matrix: os: [ubuntu-latest, macos-latest] arch: [x64, arm64] + rid: ['linux-x64', 'linux-arm64', 'osx-x64', 'osx-arm64'] steps: - uses: actions/checkout@v2 - name: Setup .NET @@ -22,9 +23,10 @@ jobs: - name: Restore dependencies run: dotnet restore ./openai-playground/openai-playground.csproj - name: Build and compile - run: dotnet publish ./openai-playground/openai-playground.csproj -c Release -r ${{ matrix.os }}-${{ matrix.arch }} --self-contained true /p:PublishTrimmed=true /p:PublishSingleFile=true /p:IncludeSymbols=true + run: dotnet publish ./openai-playground/openai-playground.csproj -c Release -r ${{ matrix.rid }} --self-contained true /p:PublishTrimmed=true /p:PublishSingleFile=true working-directory: ${{ github.workspace }} - name: Create Release + if: startsWith(github.ref, 'refs/tags/') && startsWith(github.ref, 'refs/tags/v') id: create_release uses: actions/create-release@v1 env: @@ -36,13 +38,12 @@ jobs: draft: false prerelease: false - name: Upload Release Assets + if: startsWith(github.ref, 'refs/tags/') && startsWith(github.ref, 'refs/tags/v') uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: | - ./openai-playground/bin/Release/net6.0/${{ matrix.os }}-${{ matrix.arch }}/publish/openai-playground - ./openai-playground/bin/Release/net6.0/${{ matrix.os }}-${{ matrix.arch }}/publish/openai-playground.pdb - asset_name: openai-playground-${{ matrix.os }}-${{ matrix.arch }} + asset_path: ./openai-playground/bin/Release/net6.0/${{ matrix.rid }}/publish/openai-playground + asset_name: openai-playground-${{ matrix.rid }} asset_content_type: application/octet-stream