diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..bbccc4e --- /dev/null +++ b/.github/workflows/publish.yml @@ -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 }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..5410244 --- /dev/null +++ b/.github/workflows/release.yml @@ -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 }} diff --git a/Cargo.toml b/Cargo.toml index 6b9dafc..ff8b506 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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" @@ -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" diff --git a/README.md b/README.md index 8448573..97f3fde 100644 --- a/README.md +++ b/README.md @@ -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. @@ -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. diff --git a/src/main.rs b/src/main.rs index ecfa69c..8c1d7ef 100644 --- a/src/main.rs +++ b/src/main.rs @@ -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());