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

38 lines
1.1 KiB
YAML
Raw Normal View History

2022-04-18 14:49:50 +00:00
name: Blessed.rs
on: [push]
2022-05-01 21:07:22 +00:00
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
2022-04-18 14:48:12 +00:00
jobs:
build:
name: Compile binary
2022-12-31 15:30:18 +00:00
runs-on: ubuntu-20.04
2022-04-18 14:48:12 +00:00
steps:
- name: Checkout repository
uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
2022-04-18 21:47:56 +00:00
- name: Restore rust compilation cache
2022-11-08 01:34:57 +00:00
uses: Swatinem/rust-cache@v2
- 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
2022-05-01 21:07:22 +00:00
deploy_flyio:
2022-05-01 21:58:03 +00:00
name: Deploy to Fly.io
2022-05-01 21:07:22 +00:00
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout repository
uses: actions/checkout@v3
2022-05-01 21:07:22 +00:00
- name: Download binary artifact
uses: actions/download-artifact@v3
with:
name: blessed-rs-release-binary
path: target/release
- name: Setup flyctl
uses: superfly/flyctl-actions/setup-flyctl@master
- name: Deploy to Fly.io
2022-05-01 21:58:03 +00:00
run: flyctl deploy --remote-only