rpcn 0.8 #209
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
name: Rust | |
on: [push] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- uses: Swatinem/rust-cache@v2 | |
- name: Build | |
run: cargo build --release --verbose | |
- name: Run tests | |
run: cargo test --release --verbose | |
- run: mkdir artifact | |
- run: cp target/release/rpcn artifact/rpcn | |
- run: cp rpcn.cfg artifact/rpcn.cfg | |
- run: cp servers.cfg artifact/servers.cfg | |
- name: Create artifact | |
run: cd artifact && tar -zcvf ../rpcn-linux.tar.gz ./ && cd .. | |
- name: Upload artifact | |
uses: actions/upload-artifact@v1.0.0 | |
with: | |
name: rpcn | |
path: rpcn-linux.tar.gz | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: rpcn-linux.tar.gz | |
build-win: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- uses: Swatinem/rust-cache@v2 | |
- name: Build | |
run: cargo build --release --verbose | |
- name: Run tests | |
run: cargo test --release --verbose | |
- run: mkdir artifact-win | |
- run: copy target/release/rpcn.exe artifact-win/rpcn.exe | |
- run: copy rpcn.cfg artifact-win/rpcn.cfg | |
- run: copy servers.cfg artifact-win/servers.cfg | |
- name: Create artifact | |
run: Compress-Archive -Path artifact-win/* -Destination rpcn-win.zip | |
- name: Upload artifact | |
uses: actions/upload-artifact@v1.0.0 | |
with: | |
name: rpcn-win | |
path: rpcn-win.zip | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: rpcn-win.zip |