-
-
Notifications
You must be signed in to change notification settings - Fork 11
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
1 parent
11b7266
commit ef5215a
Showing
8 changed files
with
100 additions
and
178 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,32 @@ | ||
name: Build | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
test: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
rust: [stable] | ||
os: [ubuntu-latest, macOS-latest, windows-latest] | ||
steps: | ||
- name: Setup Rust | ||
uses: hecrj/setup-rust-action@master | ||
with: | ||
rust-version: ${{ matrix.rust }} | ||
components: rustfmt, clippy | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Run cargo fmt | ||
run: cargo fmt --all -- --check | ||
- name: Run cargo clippy | ||
run: cargo clippy --all -- -D clippy::pedantic -D clippy::nursery -D warnings | ||
- name: Run tests | ||
run: | | ||
cargo test --verbose |
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,66 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*.*.*" | ||
|
||
jobs: | ||
release: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
rust: [stable] | ||
os: [ubuntu-latest, macOS-latest, windows-latest] | ||
include: | ||
- os: ubuntu-latest | ||
rust: stable | ||
artifact_name: microserver | ||
asset_name: microserver_linux.gz | ||
- os: macOS-latest | ||
rust: stable | ||
artifact_name: microserver | ||
asset_name: microserver_osx.gz | ||
- os: windows-latest | ||
rust: stable | ||
artifact_name: microserver.exe | ||
asset_name: microserver_windows.gz | ||
steps: | ||
- name: Setup Rust | ||
uses: hecrj/setup-rust-action@master | ||
with: | ||
rust-version: stable | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Build artifacts | ||
shell: bash | ||
run: | | ||
echo "Building the project" | ||
cargo build --release | ||
echo "Preparing the artifact" | ||
chmod +x "target/release/${{ matrix.artifact_name }}" | ||
gzip -k -f "target/release/${{ matrix.artifact_name }}" | ||
echo "moving target/release/${{ matrix.artifact_name }}.gz to ${{ matrix.asset_name }}" | ||
mv "target/release/${{ matrix.artifact_name }}.gz" "${{ matrix.asset_name }}" | ||
- name: Publishing to GitHub release | ||
uses: svenstaro/upload-release-action@v1-release | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
file: ${{ matrix.asset_name }} | ||
asset_name: ${{ matrix.asset_name }} | ||
tag: ${{ github.ref }} | ||
|
||
crates: | ||
runs-on: ubuntu-latest | ||
needs: [release] | ||
steps: | ||
- name: Setup Rust | ||
uses: hecrj/setup-rust-action@master | ||
with: | ||
rust-version: stable | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Publish to crates.io | ||
run: | | ||
cargo login ${{secrets.crates_key}} | ||
cargo publish |
This file was deleted.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,7 +1,7 @@ | ||
[package] | ||
name = "microserver" | ||
description = "Simple ad-hoc server with SPA support based on Warp!. Excellent for testing React, Angular, Vue apps and the like." | ||
version = "0.1.5" | ||
version = "0.1.6" | ||
authors = ["Roberto Huertas <[email protected]>"] | ||
edition = "2018" | ||
license = "MIT" | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.