From 5c80e64f4bdc4d03be891832d06ac30a78f43813 Mon Sep 17 00:00:00 2001 From: Matt Date: Tue, 27 Dec 2022 07:44:31 -0800 Subject: [PATCH 1/2] Potentially fix releaser artifact path Don't publish photonlib Update main.yml Update main.yml --- .github/workflows/main.yml | 47 ++++++++++++++++---------------------- scripts/generatePiImage.sh | 2 +- 2 files changed, 21 insertions(+), 28 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d9116c8281..249daaa11f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -221,11 +221,11 @@ jobs: - run: | chmod +x gradlew ./gradlew photon-lib:build --max-workers 1 - - run: ./gradlew photon-lib:publish photon-targeting:publish - name: Publish - env: - ARTIFACTORY_API_KEY: ${{ secrets.ARTIFACTORY_API_KEY }} - if: github.event_name == 'push' + # - run: ./gradlew photon-lib:publish photon-targeting:publish + # name: Publish + # env: + # ARTIFACTORY_API_KEY: ${{ secrets.ARTIFACTORY_API_KEY }} + # if: github.event_name == 'push' photonlib-build-docker: strategy: @@ -253,13 +253,13 @@ jobs: run: | chmod +x gradlew ./gradlew photon-lib:build --max-workers 1 - - name: Publish - run: | - chmod +x gradlew - ./gradlew photon-lib:publish - env: - ARTIFACTORY_API_KEY: ${{ secrets.ARTIFACTORY_API_KEY }} - if: github.event_name == 'push' + # - name: Publish + # run: | + # chmod +x gradlew + # ./gradlew photon-lib:publish + # env: + # ARTIFACTORY_API_KEY: ${{ secrets.ARTIFACTORY_API_KEY }} + # if: github.event_name == 'push' photonlib-wpiformat: name: "wpiformat" @@ -397,8 +397,7 @@ jobs: path: photonvision*.xz - photon-dev-release: - if: github.event_name == 'push' + photon-release: needs: [photon-build-package] runs-on: ubuntu-22.04 steps: @@ -406,6 +405,8 @@ jobs: # but the filtering below won't pick these up (I hope) - uses: actions/download-artifact@v2 + -run: find + # Push to dev release - uses: pyTooling/Actions/releaser@r0 with: @@ -413,24 +414,16 @@ jobs: tag: 'Dev' rm: true files: | - *.xz - *.jar + **/*.xz + **/*.jar if: github.event_name == 'push' - photon-release: - if: startsWith(github.ref, 'refs/tags/v') - needs: [photon-build-package] - runs-on: ubuntu-22.04 - steps: - # Download literally every single artifact. This also downloads client and docs, - # but the filtering below won't pick these up (I hope) - - uses: actions/download-artifact@v2 - # Upload all jars and xz archives - uses: softprops/action-gh-release@v1 with: files: | - *.xz - *.jar + **/*.xz + **/*.jar + if: startsWith(github.ref, 'refs/tags/v') env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/scripts/generatePiImage.sh b/scripts/generatePiImage.sh index 2bc9739ec7..b85486a46b 100755 --- a/scripts/generatePiImage.sh +++ b/scripts/generatePiImage.sh @@ -2,7 +2,7 @@ # Not that it really matters, but it'll save us 50 megs or so NEW_JAR=$(realpath $(find . -name photonvision\*-linuxarm32.jar)) echo "Using jar: " $NEW_JAR -sudo apt install xz-utils +sudo apt-get install -y xz-utils curl -sk https://api.github.com/repos/photonvision/photon-pi-gen/releases/tags/v2023.1.0-beta-1 | grep "browser_download_url.*xz" | cut -d : -f 2,3 | tr -d '"' | wget -qi - ls FILE_NAME=$(ls | grep image_*.xz) From 9e5ac559fcdc64b57b556b2c18979005730b1f61 Mon Sep 17 00:00:00 2001 From: Matt Date: Tue, 27 Dec 2022 10:29:00 -0800 Subject: [PATCH 2/2] ope --- .github/workflows/main.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 249daaa11f..0869fe2bd3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -221,11 +221,11 @@ jobs: - run: | chmod +x gradlew ./gradlew photon-lib:build --max-workers 1 - # - run: ./gradlew photon-lib:publish photon-targeting:publish - # name: Publish - # env: - # ARTIFACTORY_API_KEY: ${{ secrets.ARTIFACTORY_API_KEY }} - # if: github.event_name == 'push' + - run: ./gradlew photon-lib:publish photon-targeting:publish + name: Publish + env: + ARTIFACTORY_API_KEY: ${{ secrets.ARTIFACTORY_API_KEY }} + if: github.event_name == 'push' photonlib-build-docker: strategy: @@ -253,13 +253,13 @@ jobs: run: | chmod +x gradlew ./gradlew photon-lib:build --max-workers 1 - # - name: Publish - # run: | - # chmod +x gradlew - # ./gradlew photon-lib:publish - # env: - # ARTIFACTORY_API_KEY: ${{ secrets.ARTIFACTORY_API_KEY }} - # if: github.event_name == 'push' + - name: Publish + run: | + chmod +x gradlew + ./gradlew photon-lib:publish + env: + ARTIFACTORY_API_KEY: ${{ secrets.ARTIFACTORY_API_KEY }} + if: github.event_name == 'push' photonlib-wpiformat: name: "wpiformat"