diff --git a/.github/workflows/jar.yml b/.github/workflows/jar.yml new file mode 100644 index 0000000..dfd28b2 --- /dev/null +++ b/.github/workflows/jar.yml @@ -0,0 +1,39 @@ +name: Build Jars + +on: + release: + types: + - created + +permissions: + contents: read + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Set up JDK 11 + uses: actions/setup-java@v3 + with: + java-version: '11' + distribution: 'temurin' + + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Run build script + run: bash buildHeadless.sh + + - name: Upload Release Asset + id: upload-release-asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ github.event.release.upload_url }} + asset_path: StarfishCLI.jar + asset_name: StarfishCLI.jar + asset_content_type: application/java-archive \ No newline at end of file