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 c524462
Showing 1 changed file with 69 additions and 0 deletions.
69 changes: 69 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
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
id: 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
#- 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
# - name: Compress binary
# uses: svenstaro/upx-action@v2
# with:
# file: ${{ matrix.file }}
# args: ${{ matrix.args }}
# strip: ${{ matrix.strip }}
- name: Upload binary
needs: [create_release]
uses: skx/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
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) }}

0 comments on commit c524462

Please sign in to comment.