diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ab2f263fcf..8d1b2d9ba9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -293,3 +293,30 @@ jobs: with: name: image-${{ matrix.image_suffix }} path: photonvision*.xz + release: + needs: [build-package, build-image] + 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 + - run: find + # Push to dev release + - uses: pyTooling/Actions/releaser@r0 + with: + token: ${{ secrets.GITHUB_TOKEN }} + tag: 'Dev' + rm: true + files: | + **/*.xz + **/*.jar + if: github.event_name == 'push' + # Upload all jars and xz archives + - uses: softprops/action-gh-release@v1 + with: + files: | + **/*.xz + **/*.jar + if: startsWith(github.ref, 'refs/tags/v') + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index efbe94e726..0000000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,46 +0,0 @@ -# This workflow builds the client (UI), the server, builds the JAR. - -name: CI - -# Controls when the action will run. Triggers the workflow on push or pull request -# events but only for the master branch -on: - push: - branches: [ master ] - tags: - - 'v*' - pull_request: - branches: [ master ] - merge_group: - -jobs: - photon-release: - needs: [photon-build-package, photon-image-generator] - 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 - - - run: find - - # Push to dev release - - uses: pyTooling/Actions/releaser@r0 - with: - token: ${{ secrets.GITHUB_TOKEN }} - tag: 'Dev' - rm: true - files: | - **/*.xz - **/*.jar - if: github.event_name == 'push' - - # Upload all jars and xz archives - - uses: softprops/action-gh-release@v1 - with: - files: | - **/*.xz - **/*.jar - if: startsWith(github.ref, 'refs/tags/v') - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}