Skip to content

Commit

Permalink
test(ci): add github action to ensure build succeeds (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
loadedice authored Apr 8, 2023
1 parent 77d0e7a commit 3cdb6b0
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: 'Build Template'
on:
workflow_dispatch:
schedule:
# Run once a week at 6pm on Saturday (UTC)
- cron: '0 18 * * 6'
push:
paths-ignore:
- "**.md"

jobs:
build:
runs-on: ubuntu-latest
env:
PROJECT_NAME: my-project
steps:
- uses: actions/checkout@v3
- uses: cargo-generate/[email protected]
with:
name: ${{ env.PROJECT_NAME }}
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
# We need to move the generated project to a temp folder, away from the template project
# otherwise `cargo` runs would fail .
# see https://github.com/rust-lang/cargo/issues/9922
- run: |
mv $PROJECT_NAME ${{ runner.temp }}/
cd ${{ runner.temp }}/$PROJECT_NAME
cargo check

0 comments on commit 3cdb6b0

Please sign in to comment.