Build #116
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: Build | |
on: | |
push: | |
branches: [ develop, release ] | |
pull_request: | |
branches: [ develop, release ] | |
# Allow manual runs: | |
workflow_dispatch: | |
# Reusable workflows! | |
# See: https://docs.github.com/en/actions/using-workflows/reusing-workflows | |
workflow_call: | |
schedule: | |
# Run once a month to alert me of bit-rot. | |
# See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows#schedule | |
# Runs on the default ("develop") branch. | |
# min h d mon DoW | |
- cron: "7 5 3 * *" | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
strategy: | |
matrix: | |
os: | |
- ubuntu-latest | |
- macos-latest | |
- windows-latest | |
# Don't fail fast, if we have a failure on a specific matrix type | |
# we want to know which ones: | |
fail-fast: false | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v2 | |
# v2, as of today (June 18, 2023) | |
- uses: arduino/setup-protoc@9b1ee5b22b0a3f1feb8c2ff99b32c89b3c3191e9 | |
with: | |
version: '23.x' | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Install NPM dependencies | |
working-directory: ./web-client | |
run: npm install | |
- name: Build JavaScript Client | |
working-directory: ./web-client | |
run: npm run build | |
- name: Run Rust Tests | |
run: cargo test | |
- name: Build Rust | |
run: cargo build --release | |
- name: Save result | |
uses: actions/upload-artifact@v2 | |
with: | |
name: "FeoBlog-${{ matrix.os }}" | |
path: | | |
./target/release/feoblog | |
./target/release/feoblog.exe | |