From b4cc3bfd7c7bd6ea0d7d295c25bb4a0138bcf175 Mon Sep 17 00:00:00 2001 From: Cornelius Wichering Date: Wed, 6 Mar 2024 10:33:53 +0100 Subject: [PATCH] Add github action --- .github/workflows/main.yml | 48 +++++++++++++++----------------------- 1 file changed, 19 insertions(+), 29 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 93ae52a..aec13bf 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -36,34 +36,24 @@ jobs: # strip: true steps: - uses: actions/checkout@v4 - # - uses: graalvm/setup-graalvm@v1 - # with: - # java-version: '21' - # distribution: 'graalvm' - # github-token: ${{ secrets.GITHUB_TOKEN }} - # native-image-job-reports: 'true' - # - name: Build - # run: | - # gradle build - # native-image --no-fallback -jar build/libs/x2h.jar - # - name: Compress binary - # uses: svenstaro/upx-action@v2 - # with: - # file: ${{ matrix.file }} - # args: ${{ matrix.args }} - # strip: ${{ matrix.strip }} + - uses: graalvm/setup-graalvm@v1 + with: + java-version: '21' + distribution: 'graalvm' + github-token: ${{ secrets.GITHUB_TOKEN }} + native-image-job-reports: 'true' + - name: Build + run: | + gradle build + native-image --no-fallback -jar build/libs/x2h.jar + - name: Compress binary + uses: svenstaro/upx-action@v2 + with: + file: ${{ matrix.file }} + args: ${{ matrix.args }} + strip: ${{ matrix.strip }} - name: Upload binary - uses: skx/github-action-publish-binaries@release-2.0 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + uses: softprops/action-gh-release@v1 with: - releaseId: ${{ needs.create_release.outputs.id }} - args: 'x2h*' - - - # - name: Upload binary - # uses: actions/upload-artifact@v4 - # with: - # name: x2h-${{ matrix.os }} - # path: x2h* -#${{ fromJSON(steps.create-release.outputs.id) }} + tag_name: ${{ needs.create_release.outputs.tag-name }} + files: x2h*