diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..5e51db5 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,47 @@ +name: Build and Release + +on: + push: + tags: + - '*' + +jobs: + buildAndPush: + strategy: + matrix: + os: [ "ubuntu-20.04", "macos-14" ] + runs-on: ${{ matrix.os }} + steps: + - name: Get Tag Name + id: get_tag + shell: bash + run: | + echo "tag=${GITHUB_REF##*/}" >> "$GITHUB_OUTPUT" + + - name: Checkout yaci-store + uses: actions/checkout@v3 + with: + repository: bloxbean/yaci-store + ref: ${{ steps.get_tag.outputs.tag }} + + - uses: actions/checkout@v4 + - uses: graalvm/setup-graalvm@v1 + with: + java-version: '21' + distribution: 'graalvm' + github-token: ${{ secrets.GITHUB_TOKEN }} + version: '21.0.4' + native-image-job-reports: 'true' + + - name: Build with Gradle + run: ./gradlew clean cliZip + + - name: Release + uses: softprops/action-gh-release@v1 + if: startsWith(github.ref, 'refs/tags/') + with: + files: | + ./applications/app/build/output/yaci-store-*.zip + prerelease: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}