Skip to content

Commit

Permalink
Improve README
Browse files Browse the repository at this point in the history
  • Loading branch information
ysdragon committed Nov 3, 2024
1 parent 6f9d561 commit 42e78aa
Showing 1 changed file with 115 additions and 18 deletions.
133 changes: 115 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,129 @@
# Ring Action

An experimental GitHub Action that compiles a Ring project.
![GitHub release (latest by date)](https://img.shields.io/github/v/release/ysdragon/ring-action)
![GitHub](https://img.shields.io/github/license/ysdragon/ring-action)

## Inputs
A GitHub Action that compiles [Ring](https://ring-lang.net/) Programming Language projects.
## Features

### `file` (required)
- **Description**: The path to the Ring file to build.
- Compile Ring source files
- Generate executable files using Ring2EXE
- Install packages from RingPM
- Flexible version management:
- Linux/macOS: Build custom Ring versions from source
- Windows: Pre-built Ring releases
- Fast and lightweight
- Cross-platform support (Windows, macOS, Linux)

### `output_exe` (optional)
- **Description**: This can be set to 'true' to use Ring2EXE *(to output an executable file)*.
- **Default**: `false`
## Platform & Architecture Support

### `args` (optional)
- **Description**: Additional arguments to pass to Ring or Ring2EXE if `output_exe` is set to 'true'.
| Platform | Architecture | Supported | Notes |
|----------|--------------|-----------|--------|
| Linux | x64 || Full support |
| Linux | x86 || Not supported |
| Linux | ARM64 || Not supported |
| macOS | Intel || Full support |
| macOS | Apple Silicon || Not supported |
| Windows | x64 || Pre-built binaries only |
| Windows | x86 || Not supported |
| Windows | ARM64 || Not supported |

### `ring_packages` (optional)
- **Description**: Specifies the packages to install from RingPM.
## Inputs

### `version` (optional)
- **Description**: Specifies the version of the Ring compiler to use. This can be any valid reference for `git checkout`, such as a commit hash, tag, or branch.
- **Default**: `v1.21.2` *(Latest release)*
| Input | Required | Default | Description |
|-------|----------|---------|-------------|
| `file` || - | Path to the Ring source file to build |
| `output_exe` || `false` | Set to `true` to generate an executable using Ring2EXE |
| `args` || - | Additional arguments to pass to Ring or Ring2EXE |
| `ring_packages` || - | Space-separated list of packages to install from RingPM |
| `version` || `v1.21.2` | Ring compiler version to use |

## Example Usage
## Usage Examples

Here’s an example of how to use this action in your workflow:
### Simple example

```yaml
uses: ysdragon/ring-action@v1.0.1
uses: ysdragon/ring-action@v1.0.3
with:
file: "program.ring"
```
```
### Linux
```yaml
name: Linux Build
on: [push]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build Linux executable
uses: ysdragon/ring-action@v1.0.3
with:
file: "program.ring"
output_exe: "true"
args: "-static"
```
### macOS
```yaml
name: macOS Intel Build
on: [push]

jobs:
build:
runs-on: macos-12
steps:
- uses: actions/checkout@v4
- name: Build macOS Intel app
uses: ysdragon/ring-action@v1.0.3
with:
file: "program.ring"
output_exe: "true"
```
### Windows
```yaml
name: Windows x64 Build
on: [push]

jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Build Windows x64 executable
uses: ysdragon/ring-action@v1.0.3
with:
file: "program.ring"
output_exe: "true"
args: "-static"
```
### Cross-Platform Build
```yaml
name: Cross-Platform Build
on: [push]

jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-12]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Build Ring project
uses: ysdragon/ring-action@v1.0.3
with:
file: "program.ring"
output_exe: "true"
```
## License
This project is open source and available under the [MIT](https://github.com/ysdragon/ring-action/blob/main/LICENSE) License.

0 comments on commit 42e78aa

Please sign in to comment.