Skip to content

Commit

Permalink
add new keys to the dev server, tests with github actions for multi-p…
Browse files Browse the repository at this point in the history
…latform support, readme improvement
  • Loading branch information
orpos committed Dec 10, 2024
1 parent 473741e commit 337f982
Show file tree
Hide file tree
Showing 11 changed files with 337 additions and 133 deletions.
103 changes: 103 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
name: Release
on:
push:
tags:
- v*
env:
BIN_NAME: kaledis
jobs:
build:
strategy:
matrix:
include:
- os: ubuntu-latest
host: linux
arch: x86_64
target: x86_64-unknown-linux-gnu

- os: windows-latest
host: windows
arch: x86_64
target: x86_64-pc-windows-msvc

- os: macos-13
host: macos
arch: x86_64
target: x86_64-apple-darwin

- os: macos-latest
host: macos
arch: aarch64
target: aarch64-apple-darwin
runs-on: ${{ matrix.os }}
name: Build for ${{ matrix.host }}-${{ matrix.arch }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Set env
shell: bash
run: |
ARCHIVE_NAME=${{ env.BIN_NAME }}-$(echo ${{ github.ref_name }} | cut -c 2-)-${{ matrix.host }}-${{ matrix.arch }}
echo "ARCHIVE_NAME=$ARCHIVE_NAME" >> $GITHUB_ENV
- name: Install OS dependencies
if: ${{ matrix.host == 'linux' }}
run: |
sudo apt-get update
sudo apt-get install libdbus-1-dev pkg-config
- name: Build
run: cargo build --bins --all-features --release --target ${{ matrix.target }} --locked

- name: Archive
shell: bash
run: |
if [ ${{ matrix.host }} = "windows" ]; then
mv target/${{ matrix.target }}/release/${{ env.BIN_NAME }}.exe ${{ env.BIN_NAME }}.exe
7z a ${{ env.ARCHIVE_NAME }}.zip ${{ env.BIN_NAME }}.exe
tar -czf ${{ env.ARCHIVE_NAME }}.tar.gz ${{ env.BIN_NAME }}.exe
else
mv target/${{ matrix.target }}/release/${{ env.BIN_NAME }} ${{ env.BIN_NAME }}
zip -r ${{ env.ARCHIVE_NAME }}.zip ${{ env.BIN_NAME }}
tar -czf ${{ env.ARCHIVE_NAME }}.tar.gz ${{ env.BIN_NAME }}
fi
- name: Upload zip artifact
uses: actions/upload-artifact@v4
with:
name: ${{ env.ARCHIVE_NAME }}.zip
path: ${{ env.ARCHIVE_NAME }}.zip

- name: Upload tar.gz artifact
uses: actions/upload-artifact@v4
with:
name: ${{ env.ARCHIVE_NAME }}.tar.gz
path: ${{ env.ARCHIVE_NAME }}.tar.gz

create_release:
name: Create Release
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: read
needs: [ build, publish ]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/download-artifact@v4
with:
path: artifacts
merge-multiple: true

- name: Create Release
id: create_release
uses: softprops/action-gh-release@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag_name: ${{ github.ref_name }}
name: ${{ github.ref_name }}
draft: true
prerelease: ${{ endsWith(github.ref_name, 'rc') }}
files: artifacts/*
70 changes: 45 additions & 25 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "kaledis"
version = "1.3.0"
version = "1.3.1"
edition = "2021"
authors = ["lettuce-magician", "orpos"]
documentation = "https://github.com/orpos/kaledis"
Expand All @@ -15,7 +15,6 @@ inquire = "0.7.5"
serde = { version = "1.0.215", features = ["derive"] }
tokio = { version = "1.41.1", features = ["full"] }
toml = "0.8.19"
dal_core = { path="./dal_custom", version="0.1.0" }
url = { version = "2.5.3", features = ["serde"] }
glob = "0.3.1"
zip = "2.2.0"
Expand All @@ -30,3 +29,4 @@ futures = "0.3.31"
strum_macros = "0.26.4"
strum = { version = "0.26.3", features = ["strum_macros"] }
indexmap = "2.7.0"
dal_core = { version = "0.1.0", path = "./dal_custom"}
36 changes: 36 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,42 @@ Go to the Releases page and download the `kaledis.exe` file. *Windows only.*
### From Source
Clone the repo, then use `cargo build` to build the project from scratch *Probably all platforms.*

## Usage

by default [PATH] is the directory kaledis is executed on.

### `init`
Initializes a new Love2D project.
```sh
kaledis init [PATH]
```

### `build`
Transpiles the project and builds a .love file inside the '.build' directory.
```sh
kaledis build [PATH] -o
```
The -o flag joins all files in a single one.

### `compile`
Compiles the project into a executable inside the 'dist' folder.
```sh
kaledis compile [PATH] -o
```
The -o flag joins all files in a single one.

### `dev`
Watches for changes in your project, builds and executes love automatically/manual
```sh
kaledis dev [PATH]
```

### `update`
Tries to update to the latest release using github releases.
```sh
kaledis update
```

## Credits
- [Dal](https://github.com/CavefulGames/dal) for the awesome transpiling system.

Expand Down
Loading

0 comments on commit 337f982

Please sign in to comment.