Skip to content

Commit

Permalink
Setup GitHub Actions / CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Mathieu Amiot committed Jul 10, 2020
1 parent 899d637 commit 696464b
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Handle Release

on:
release:
types: [created]

jobs:
generate:
name: Create release-artifacts
runs-on: windows-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v1
- name: Install minimal stable Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
- name: Run build
uses: actions-rs/cargo@v1
with:
command: build
args: --release
- name: Run tests
uses: actions-rs/cargo@v1
with:
command: test
args: --release
- name: Move/rename executable
shell: bash
run: |
mv target/release/timerset.exe timerset_windows_${{ github.event.release.tag_name }}.exe
- name: Upload Release Asset
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./timerset_windows_${{ github.event.release.tag_name }}.exe
asset_name: timerset_windows_${{ github.event.release.tag_name }}.exe
asset_content_type: application/zip
32 changes: 32 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Rust

on: [push]

jobs:
build:

runs-on: windows-latest
strategy:
fail-fast: true
steps:
- uses: actions/checkout@v1
- name: Install minimal stable with clippy and rustfmt
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: rustfmt, clippy
- name: Run cargo check
uses: actions-rs/cargo@v1
with:
command: check
- name: Run build
uses: actions-rs/cargo@v1
with:
command: build
args: --verbose
- name: Run tests
uses: actions-rs/cargo@v1
with:
command: test
args: --verbose

0 comments on commit 696464b

Please sign in to comment.