diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3cd2e072e..7fdb85709 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -151,13 +151,13 @@ jobs: - run: | chmod +x gradlew ./gradlew photon-targeting:build photon-lib:build -Pbuildalldesktop -i - - run: ./gradlew photon-lib:publish photon-targeting:publish + - run: ./gradlew photon-lib:publish photon-targeting:publish -Pbuildalldesktop name: Publish env: ARTIFACTORY_API_KEY: ${{ secrets.ARTIFACTORY_API_KEY }} - if: github.event_name == 'push' + if: github.event_name == 'push' && github.repository_owner == 'photonvision' # Copy artifacts to build/outputs/maven - - run: ./gradlew photon-lib:publish photon-targeting:publish outputVersion -PcopyOfflineArtifacts + - run: ./gradlew photon-lib:publish photon-targeting:publish -PcopyOfflineArtifacts -Pbuildalldesktop - uses: actions/upload-artifact@v4 with: name: maven-${{ matrix.artifact-name }} @@ -196,12 +196,12 @@ jobs: - name: Publish run: | chmod +x gradlew - ./gradlew photon-lib:publish photon-targeting:publish + ./gradlew photon-lib:publish photon-targeting:publish ${{ matrix.build-options }} env: ARTIFACTORY_API_KEY: ${{ secrets.ARTIFACTORY_API_KEY }} - if: github.event_name == 'push' + if: github.event_name == 'push' && github.repository_owner == 'photonvision' # Copy artifacts to build/outputs/maven - - run: ./gradlew photon-lib:publish photon-targeting:publish outputVersion -PcopyOfflineArtifacts + - run: ./gradlew photon-lib:publish photon-targeting:publish -PcopyOfflineArtifacts ${{ matrix.build-options }} - uses: actions/upload-artifact@v4 with: name: maven-${{ matrix.artifact-name }} diff --git a/build.gradle b/build.gradle index ce4517054..00e203f82 100644 --- a/build.gradle +++ b/build.gradle @@ -60,23 +60,6 @@ ext { println("Publishing Photonlib to " + photonMavenURL) } -task outputVersion() { - def versionFile = file("$allOutputsFolder/version.txt") - - description = 'Prints the versions of wpilib to a file for use by the downstream packaging project' - group = 'Build' - outputs.files(versionFile) - - doFirst { - buildDir.mkdir() - allOutputsFolder.mkdir() - } - - doLast { - versionFile.write versionString - } -} - spotless { java { target fileTree('.') {