blessed-rs/.github/workflows/github-actions.yml

41 lines
1.2 KiB
YAML
Raw Normal View History

2022-04-18 14:49:50 +00:00
name: Blessed.rs
on: [push]
2022-04-18 14:48:12 +00:00
jobs:
build:
name: Compile binary
2022-04-18 14:48:12 +00:00
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install rust toolchain
uses: actions-rs/toolchain@v1
2022-04-18 14:48:12 +00:00
with:
toolchain: stable
2022-04-18 21:47:56 +00:00
- name: Restore rust compilation cache
uses: Swatinem/rust-cache@v1
- name: Compile release build
2022-04-18 16:59:26 +00:00
run: cargo build --release --all-features
- name: Upload binary as artifact
uses: actions/upload-artifact@v3
with:
name: blessed-rs-release-binary
path: target/release/blessed-rs
deploy:
name: Deploy to Heroku
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Download binary artifact
uses: actions/download-artifact@v3
with:
name: blessed-rs-release-binary
2022-04-18 17:37:14 +00:00
path: target/release
2022-04-18 16:59:26 +00:00
- name: Deploy to Heroku
uses: akhileshns/heroku-deploy@v3.12.12
with:
heroku_api_key: ${{secrets.HEROKU_API_TOKEN}}
2022-04-18 16:59:26 +00:00
heroku_app_name: "blessed-rs" #Must be unique in Heroku
heroku_email: "nico@nicoburns.com"
usedocker: true