Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(automation): use user-facing Tangram installer #137

Merged
merged 5 commits into from
Jan 9, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 4 additions & 36 deletions .github/workflows/tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,56 +6,24 @@ on:

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
- name: Check out packages 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
- name: Install Tangram
run: |
mkdir -p ./bin
cp ./tangram/target/release/${{ env.RUST_BINARY_NAME }} ./bin/
echo "./bin" >> $GITHUB_PATH
curl -fsSL https://tangram.dev/install.sh | bash
echo "${HOME}/.tangram/bin" >> $GITHUB_PATH

- name: Tag and push all packages
shell: bash
Expand Down