Skip to content

Commit

Permalink
Add release workflows to Actions (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
mirdaki authored Nov 22, 2021
1 parent 922756c commit 3eda987
Show file tree
Hide file tree
Showing 5 changed files with 75 additions and 3 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Based on https://pratikpc.medium.com/publishing-crates-using-github-actions-165ee67780e1

on:
release:
types: [created]

name: Publish to Crates.io

jobs:
publish:
name: Publish
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true

- run: cargo publish --token ${CRATES_TOKEN}
env:
CRATES_TOKEN: ${{ secrets.CRATES_TOKEN }}
30 changes: 30 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Based on https://github.com/rust-build/rust-build.action

on:
release:
types: [created]

name: Release Artifacts

jobs:
release:
name: Release ${{ matrix.target }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- target: x86_64-pc-windows-gnu
archive: zip
- target: x86_64-unknown-linux-musl
archive: tar.gz tar.xz
- target: x86_64-apple-darwin
archive: zip
steps:
- uses: actions/checkout@master
- name: Compile and release
uses: rust-build/rust-build.action@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RUSTTARGET: ${{ matrix.target }}
ARCHIVE_TYPES: ${{ matrix.archive }}
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name = "theforce"
version = "0.1.0"
edition = "2018"
authors = ["Matthew Booe"]
description = "A Star Wars inspired programming language."
homepage = "https://github.com/mirdaki/theforce"
repository = "https://github.com/mirdaki/theforce"
Expand All @@ -13,7 +14,7 @@ categories = ["compilers", "command-line-utilities"]
llvm = ["inkwell"]

[dependencies]
inkwell = { git = "https://github.com/TheDan64/inkwell", branch = "llvm10-0", optional = true }
inkwell = { git = "https://github.com/TheDan64/inkwell", branch = "llvm10-0", optional = true, version = "0.1.0-beta.4" }
pest = "2.1.3"
pest_derive = "2.1.0"
clap = "2.33.3"
18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,22 @@ May The Force be with you.

To learn about using The Force, please look at the [introduction](docs/introduction.md). We also have some [examples](examples) of full programs you can use as reference.

### Installing

If you have [cargo](https://doc.rust-lang.org/cargo/):
```bash
cargo install theforce
```

Or download directly from our [releases](https://github.com/mirdaki/theforce/releases).

### Usage

Run a `.force` file:
```bash
theforce /path/to/file
```

### Developing

[Install Rust](https://www.rust-lang.org/tools/install). We also provide a [Dev Container](https://code.visualstudio.com/docs/remote/create-dev-container) if you would prefer to run it that way.
Expand Down Expand Up @@ -43,7 +59,7 @@ Please read [CONTRIBUTING.md](CONTRIBUTING.md) for how to contribute to the proj

## License

This project is dual-licensed under the MIT and Yoda License - see the [LICENSE.md](LICENSE.md) and [YODA-LICENSE.md](YODA-LICENSE.md) files for details.
This project is dual-licensed under the MIT or Yoda License - see the [LICENSE.md](LICENSE.md) and [YODA-LICENSE.md](YODA-LICENSE.md) files for details.

The Force is in no way affiliated with or endorsed by Lucasfilm Limited or any of its subsidiaries, employees, or associates. All Star Wars quotes and references in this project are copyrighted to Lucasfilm Limited. This project intends to use these strictly within the terms of fair use under United States copyright laws.

Expand Down
1 change: 0 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ mod compiler;

fn main() -> Result<(), String> {
let args = cli::parse_arguments();

let source = cli::read_source(args)?;

let ast = parser::parse(source.as_str());
Expand Down

0 comments on commit 3eda987

Please sign in to comment.