-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
26 changed files
with
2,174 additions
and
2,230 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
name: Upload release asset | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 | ||
|
||
jobs: | ||
release: | ||
name: Create release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: Release ${{ github.ref }} | ||
body: Please see the changelog for details about this new release. | ||
draft: false | ||
prerelease: false | ||
outputs: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
|
||
build-linux-x86_64: | ||
name: Build Linux x86_64 release assets | ||
needs: release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
- run: sudo apt-get update | ||
- run: sudo apt-get install libncurses5-dev libncursesw5-dev | ||
- name: Build project | ||
run: | | ||
cargo build --release --locked | ||
mkdir shellcaster | ||
cp target/release/shellcaster shellcaster/ | ||
cp config.toml README.md LICENSE shellcaster/ | ||
tar czvf shellcaster-linux-x86_64-bundled.tar.gz shellcaster/{shellcaster,config.toml,README.md,LICENSE} | ||
- name: Upload Release Asset | ||
id: upload-release-asset | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ needs.release.outputs.upload_url }} | ||
asset_path: ./shellcaster-linux-x86_64-bundled.tar.gz | ||
asset_name: shellcaster-linux-x86_64-bundled.tar.gz | ||
asset_content_type: application/gzip | ||
|
||
build-mac-x86_64: | ||
name: Build MacOS x86_64 release assets | ||
needs: release | ||
runs-on: macos-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
- name: Build project | ||
run: | | ||
cargo build --release --locked | ||
mkdir shellcaster | ||
cp target/release/shellcaster shellcaster/ | ||
cp config.toml README.md LICENSE shellcaster/ | ||
tar czvf shellcaster-macos-x86_64-bundled.tar.gz shellcaster/{shellcaster,config.toml,README.md,LICENSE} | ||
- name: Upload Release Asset | ||
id: upload-release-asset | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ needs.release.outputs.upload_url }} | ||
asset_path: ./shellcaster-macos-x86_64-bundled.tar.gz | ||
asset_name: shellcaster-macos-x86_64-bundled.tar.gz | ||
asset_content_type: application/gzip | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Compile and test | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
test: | ||
name: Check and run tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
- run: sudo apt-get update | ||
# need to install ncurses library headers | ||
- run: sudo apt-get install libncurses5-dev libncursesw5-dev | ||
- run: cargo check --locked | ||
- run: cargo test --locked |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
/target | ||
**/*.rs.bk | ||
*.db | ||
/.meta | ||
/.meta | ||
/build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.