Skip to content

Commit

Permalink
Add github action
Browse files Browse the repository at this point in the history
  • Loading branch information
sne11ius committed Mar 6, 2024
1 parent b95cdb2 commit ee5da74
Showing 1 changed file with 62 additions and 0 deletions.
62 changes: 62 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Create Release and Publish

on:
push:
tags:
- 'v*'

jobs:
create-release:
name: Create Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Create Release
uses: softprops/action-gh-release@v1
releases-matrix:
name: Release Binaries
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
file: x2h
args: --best --lzma
strip: true
# Omitted due to upx: "Error: No files found."
- os: windows-latest
file: x2h.exe
args: -9
strip: false
- os: macos-latest
file: x2h
args: --best
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
# halp for debug err on windows with x2h.exe.exe
- name: Halps
run: |
ls
- name: Compress binaries
uses: svenstaro/upx-action@v2
with:
file: ${{ matrix.file }}
args: ${{ matrix.args }}
strip: ${{ matrix.strip }}
- name: Upload binary
uses: actions/upload-artifact@v4
with:
name: x2h-${{ matrix.os }}
path: x2h*

0 comments on commit ee5da74

Please sign in to comment.