Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@ on:

jobs:
build:

runs-on: ubuntu-latest
name: Build on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]

steps:
- uses: actions/checkout@v4
Expand Down
34 changes: 29 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ permissions:

jobs:
build-and-release:
runs-on: ubuntu-latest
name: Build on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]

steps:
- uses: actions/checkout@v4
Expand All @@ -25,6 +29,7 @@ jobs:

- name: Extract version from pom.xml
id: get_version
shell: bash
run: |
VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
echo "version=$VERSION" >> $GITHUB_OUTPUT
Expand All @@ -36,11 +41,23 @@ jobs:
- name: Build Native Image
run: mvn -Pnative native:compile --file pom.xml

- name: Rename binary for OS
shell: bash
run: |
if [ "$RUNNER_OS" == "Windows" ]; then
mv target/minigit.exe target/minigit-windows.exe
elif [ "$RUNNER_OS" == "macOS" ]; then
mv target/minigit target/minigit-macos
else
mv target/minigit target/minigit-linux
fi

- name: Create Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ github.ref_name }}
name: Release ${{ steps.get_version.outputs.version }}
append_body: true
body: |
## MiniGit Release ${{ steps.get_version.outputs.version }}

Expand All @@ -49,10 +66,15 @@ jobs:
### Installation
Download the native binary for your platform or the JAR file:

**Native Binary (Linux):**
**Native Binary (Linux/macOS):**
```bash
chmod +x minigit
./minigit <command>
chmod +x minigit-<os>
./minigit-<os> <command>
```

**Native Binary (Windows):**
```cmd
minigit-windows.exe <command>
```

**JAR File:**
Expand All @@ -68,6 +90,8 @@ jobs:
- `status` - Check repository status
files: |
target/minigit-${{ steps.get_version.outputs.version }}.jar
target/minigit
target/minigit-linux
target/minigit-macos
target/minigit-windows.exe
draft: false
prerelease: false
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<groupId>com.regisx001.minigit</groupId>
<artifactId>minigit</artifactId>
<packaging>jar</packaging>
<version>0.1.1</version>
<version>0.1.2</version>

<name>MiniGit</name>
<description>Educational Git-like version control system</description>
Expand Down