Remove extra separator from nuget packages (#5) #41
This file contains hidden or 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 | |
| on: [ push, pull_request ] | |
| jobs: | |
| build-linux: | |
| name: "Build - Linux" | |
| runs-on: ubuntu-latest | |
| container: wpilib/ubuntu-base:24.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| - name: Setup Dependencies | |
| run: sudo apt-get update && sudo apt-get install -y ninja-build libusb-1.0-0-dev libudev-dev | |
| - name: Build | |
| run: ./gradlew build | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: Linux | |
| path: build/allOutputs | |
| # build-linux-arm64: | |
| # name: "Build - Linux Arm64" | |
| # runs-on: ubuntu-latest | |
| # container: wpilib/aarch64-cross-ubuntu:bullseye-2027-24.04 | |
| # steps: | |
| # - uses: actions/checkout@v4 | |
| # with: | |
| # submodules: true | |
| # - name: Build | |
| # run: ./gradlew build -Pforcecrossbuild=linux-arm64 | |
| # - uses: actions/upload-artifact@v4 | |
| # with: | |
| # name: Linux Arm64 | |
| # path: build/allOutputs | |
| # build-linux-systemcore: | |
| # name: "Build - Linux Systemcore" | |
| # runs-on: ubuntu-latest | |
| # container: wpilib/systemcore-cross-ubuntu:2027-24.04 | |
| # steps: | |
| # - uses: actions/checkout@v4 | |
| # with: | |
| # submodules: true | |
| # - name: Build | |
| # run: ./gradlew build -Pforcecrossbuild=linux-systemcore | |
| # - uses: actions/upload-artifact@v4 | |
| # with: | |
| # name: Linux Systemcore | |
| # path: build/allOutputs | |
| build-windows: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - artifact-name: Win64 | |
| architecture: x64 | |
| vc: vcvars64.bat | |
| - artifact-name: WinArm64 | |
| architecture: x64 | |
| vc: vcvarsamd64_arm64.bat | |
| build-options: "-Pforcecrossbuild=windows-arm64" | |
| name: "Build - ${{ matrix.artifact-name }}" | |
| runs-on: windows-2022 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| - uses: actions/setup-java@v4 | |
| with: | |
| java-version: 21 | |
| distribution: 'temurin' | |
| architecture: ${{ matrix.architecture }} | |
| - name: Build with Gradle | |
| run: | | |
| @call "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC\\Auxiliary\\Build\\${{ matrix.vc }}" | |
| gradlew build ${{ matrix.build-options }} | |
| shell: cmd | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.artifact-name }} | |
| path: build/allOutputs | |
| build-macos: | |
| name: "Build - macOS" | |
| runs-on: macos-15 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| - name: Build | |
| run: ./gradlew build | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: macOS | |
| path: build/allOutputs | |
| nuget: | |
| name: NuGet Package | |
| needs: [ build-linux, build-windows, build-macos ] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| path: nuget/products | |
| - name: Flatten Artifacts | |
| run: rsync -a --delete nuget/products/*/* nuget/products/ | |
| - uses: actions/setup-java@v4 | |
| with: | |
| java-version: 17 | |
| distribution: 'temurin' | |
| - name: Build NuGet Package | |
| if: | | |
| !startsWith(github.ref, 'refs/tags/v') | |
| run: ../gradlew generateNugetPackages | |
| working-directory: nuget | |
| - name: Publish NuGet Package (Release) | |
| if: | | |
| github.repository_owner == 'wpilibsuite' && | |
| startsWith(github.ref, 'refs/tags/v') | |
| run: ../gradlew publishNugetPackage publishStaticNugetPackage | |
| working-directory: nuget | |
| env: | |
| ARTIFACTORY_PUBLISH_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }} | |
| ARTIFACTORY_PUBLISH_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }} | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: NuGet | |
| path: nuget/build/nugetpackages | |
| combine: | |
| name: Combine | |
| needs: [ build-linux, build-windows, build-macos ] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| repository: wpilibsuite/build-tools | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| path: combiner/products/build/allOutputs | |
| - name: Flatten Artifacts | |
| run: rsync -a --delete combiner/products/build/allOutputs/*/* combiner/products/build/allOutputs/ | |
| - uses: actions/setup-java@v4 | |
| with: | |
| java-version: 17 | |
| distribution: 'temurin' | |
| - name: Combine | |
| if: | | |
| !startsWith(github.ref, 'refs/tags/v') | |
| run: ./gradlew publish -Pthirdparty | |
| working-directory: combiner | |
| - name: Combine (Release) | |
| if: | | |
| github.repository_owner == 'wpilibsuite' && | |
| startsWith(github.ref, 'refs/tags/v') | |
| run: | | |
| ./gradlew publish -Pthirdparty | |
| working-directory: combiner | |
| env: | |
| RUN_AZURE_ARTIFACTORY_RELEASE: 'TRUE' | |
| ARTIFACTORY_PUBLISH_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }} | |
| ARTIFACTORY_PUBLISH_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }} | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: Maven | |
| path: ~/releases |