Scheduled Release Check #1165
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: Scheduled Release Check | |
| on: | |
| schedule: | |
| - cron: 0 0,6,12,18 * * * | |
| workflow_dispatch: | |
| jobs: | |
| check: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| needs_build: ${{ steps.compare_versions.outputs.needs_build }} | |
| release: ${{ steps.wgpu_release.outputs.release }} | |
| upload_url: ${{ steps.create_release.outputs.upload_url }} | |
| steps: | |
| - uses: pozetroninc/github-action-get-latest-release@master | |
| name: Get WGPU release | |
| id: wgpu_release | |
| with: | |
| repository: gfx-rs/wgpu-native | |
| - uses: pozetroninc/github-action-get-latest-release@master | |
| name: Get local release | |
| id: local_release | |
| with: | |
| repository: MyWorldLLC/webgpu-java | |
| - name: Compare versions | |
| id: compare_versions | |
| run: echo "needs_build=${{ steps.wgpu_release.outputs.release != steps.local_release.outputs.release }}" >> "$GITHUB_OUTPUT" | |
| - name: Create release | |
| uses: softprops/action-gh-release@master | |
| id: create_release | |
| if: ${{ steps.compare_versions.outputs.needs_build == 'true' }} | |
| with: | |
| draft: false | |
| prerelease: false | |
| make_latest: 'true' | |
| body: "Automatically generated bindings for https://github.com/gfx-rs/wgpu-native. Supports Java 22." | |
| tag_name: ${{ steps.wgpu_release.outputs.release }} | |
| bindings: | |
| needs: [check] | |
| uses: myworldllc/webgpu-java/.github/workflows/build-and-publish-bindings.yml@main | |
| if: ${{ needs.check.outputs.needs_build == 'true' }} | |
| with: | |
| wgpuVersion: ${{ needs.check.outputs.release }} | |
| secrets: | |
| PKG_PUBLISHING_AUTH_TOKEN: ${{ secrets.PKG_PUBLISHING_AUTH_TOKEN }} | |
| natives: | |
| runs-on: ubuntu-latest | |
| needs: [check] | |
| if: ${{ needs.check.outputs.needs_build == 'true' }} | |
| steps: | |
| - run: echo "TODO - build natives" |