-
Notifications
You must be signed in to change notification settings - Fork 2
66 lines (54 loc) · 1.5 KB
/
tag.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
name: Tag Packages
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
BUN_VERSION: 1.1.43
CARGO_TERM_COLOR: always
RUST_BINARY_NAME: tangram
RUST_REPO: tangramdotdev/tangram
RUST_REV: 57c9cd4f999f381c9e03e8ff2ba807b22c0d72b2
jobs:
tag-and-push:
runs-on: ubuntu-latest
steps:
- name: Check out workflow repository
uses: actions/checkout@v4
- name: Check out Rust repository
uses: actions/checkout@v4
with:
repository: ${{ env.RUST_REPO }}
path: tangram
ref: ${{ env.RUST_REV }}
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Install Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: ${{ env.BUN_VERSION }}
- name: Cache Rust dependencies
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
tangram/target
key: ${{ runner.os }}-cargo-${{ hashFiles('tangram/**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Build Tangram
working-directory: tangram
run: cargo build --verbose --release
- name: Copy Tangram to path
run: |
mkdir -p ./bin
cp ./tangram/target/release/${{ env.RUST_BINARY_NAME }} ./bin/
echo "./bin" >> $GITHUB_PATH
- name: Tag and push all packages
shell: bash
run: |
bun run auto -p