-
Notifications
You must be signed in to change notification settings - Fork 26
82 lines (68 loc) · 2.04 KB
/
snapshot-cargo.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: Publish crates snapshots
on:
workflow_call:
inputs:
ref:
description: "git ref to checkout to"
type: string
default: "master"
outputs:
version:
description: "crate snapshots version"
value: ${{ jobs.publish.outputs.version }}
jobs:
publish:
name: "Publish crates"
runs-on: builder
timeout-minutes: 60
env:
RUSTFLAGS: "-D warnings"
RUSTC_WRAPPER: "sccache"
outputs:
version: "${{ steps.snapshot.outputs.version }}"
permissions:
contents: read
id-token: write
steps:
- name: Checkout Marine
uses: actions/checkout@v4
with:
repository: fluencelabs/marine
ref: ${{ inputs.ref }}
- name: Import secrets
uses: hashicorp/vault-action@cb841f2c86fb6d07cff94fda240828c1abc5ba43 # v2.7.3
with:
url: https://vault.fluence.dev
path: jwt/github
role: ci
method: jwt
jwtGithubAudience: "https://github.com/fluencelabs"
jwtTtl: 300
exportToken: false
secrets: |
kv/cargo-registry/users/ci token | CARGO_REGISTRIES_FLUENCE_TOKEN
- name: Setup Rust toolchain
uses: dsherret/rust-toolchain-file@v1
- name: Setup cache
uses: Swatinem/rust-cache@v2
with:
cache-directories: ~/.cache/sccache
shared-key: marine
save-if: false
- name: Setup sccache
uses: mozilla-actions/sccache-action@v0.0.3
- name: Generate snapshot version
id: version
uses: fluencelabs/github-actions/generate-snapshot-id@main
- name: Publish crate snapshots
id: snapshot
uses: fluencelabs/github-actions/cargo-publish-snapshot@main
with:
id: ${{ steps.version.outputs.id }}
- name: Build marine
run: cargo build -p marine --release
- name: Upload binary to checks
uses: actions/upload-artifact@v3
with:
name: marine
path: target/release/marine