-
-
Notifications
You must be signed in to change notification settings - Fork 49
51 lines (49 loc) · 1.35 KB
/
shuttle.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Shuttle.rs
on:
push:
branches:
- master
tags:
- "v*.*.*"
pull_request:
branches:
- master
workflow_dispatch:
jobs:
build:
name: Build / Deploy
runs-on: ubuntu-22.04
steps:
- name: Checkout the repository
uses: actions/checkout@v4
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
- uses: dorny/paths-filter@v2
id: changes
with:
filters: |
manifest:
- 'Cargo.**'
- name: Install cargo-binstall
uses: taiki-e/install-action@cargo-binstall
- name: Install cargo-shuttle
run: cargo binstall -y cargo-shuttle
- name: Prepare for deployment
shell: bash
run: sed -i 's|default = \["rustls"\]|default = \["rustls", "shuttle"\]|g' Cargo.toml
- name: Build
run: cargo build --locked --verbose
- name: Deploy
if: |
${{ startsWith(github.event.ref, 'refs/tags/v') ||
github.event_name == 'workflow_dispatch' ||
steps.changes.outputs.manifest == 'true'
}}
run: |
cargo shuttle login --api-key ${{ secrets.SHUTTLE_TOKEN }}
cargo shuttle project restart
cargo shuttle deploy --allow-dirty --no-test