Daily Workflow #36
Workflow file for this run
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: Daily Workflow | |
on: | |
# Run every week day at 12 PM UTC | |
schedule: | |
- cron: "0 12 * * 1-5" | |
# Allow workflow to be triggered manually. | |
workflow_dispatch: | |
env: | |
BRANCH: "master" # TODO: Change main branch to main | |
CARGO_TERM_COLOR: always | |
jobs: | |
# Generate lockfile separately so that each OS uses the same locked | |
# versions. Using ubuntu-latest because it is the cheapest. | |
generate-lockfile-and-audit: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: ${{ env.BRANCH }} | |
- name: Generate lockfile | |
run: cargo generate-lockfile -v | |
- name: Install cargo make | |
uses: davidB/rust-cargo-make@v1 | |
with: | |
version: "0.36.13" | |
- name: Audit | |
run: cargo make audit | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: Cargo.lock | |
path: Cargo.lock | |
intense-tests: | |
needs: generate-lockfile-and-audit | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Install cargo make | |
uses: davidB/rust-cargo-make@v1 | |
with: | |
version: "0.36.13" | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ env.BRANCH }} | |
- name: Nextest with release | |
run: cargo make test | |
publish: | |
needs: intense-tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: ${{ env.BRANCH }} | |
- name: Publish | |
uses: katyo/publish-crates@v2 | |
with: | |
args: "--verbose" | |
publish-delay: 1000 # Wait 1 second between publishing dependencies. | |
ignore-unpublished-changes: true | |
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }} |