Skip to content
Draft
Show file tree
Hide file tree
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
92 changes: 92 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
name: Build Packages

on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
push:
branches: ["main"]

jobs:
test:
if: github.event_name == 'pull_request'
runs-on: ${{ matrix.runner }}
environment: test
strategy:
fail-fast: false
matrix:
include:
- runner: [self-hosted, macOS, ARM64]
enabled: true
- runner: [self-hosted, Linux, X64]
enabled: true

steps:
- name: Check out packages repository
uses: actions/checkout@v4

- name: Set environment variables
run: |
echo "TANGRAM_CI_DIR=$HOME/.tangram-ci" >> $GITHUB_ENV
echo "TG_EXE=$HOME/.tangram-ci/bin/tangram" >> $GITHUB_ENV

- name: Configure Tangram
run: |
mkdir -p "$TANGRAM_CI_DIR/bin"
cat > "$TANGRAM_CI_DIR/config.json" << 'EOF'
{
"remotes": []
}
EOF
cat > "$TANGRAM_CI_DIR/bin/tangram" << 'EOF'
#!/bin/sh
exec tangram --directory "$TANGRAM_CI_DIR/.tangram" --config "$TANGRAM_CI_DIR/config.json" "$@"
EOF
chmod +x "$TANGRAM_CI_DIR/bin/tangram"

- name: Test packages
if: matrix.enabled
shell: bash
run: |
bun run auto --test --sequential

release:
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: ${{ matrix.runner }}
environment: release
strategy:
fail-fast: false
matrix:
include:
- runner: [self-hosted, macOS, ARM64]
enabled: true
- runner: [self-hosted, Linux, X64]
enabled: true

steps:
- name: Check out packages repository
uses: actions/checkout@v4

- name: Set environment variables
run: |
echo "TANGRAM_CI_DIR=$HOME/.tangram-ci" >> $GITHUB_ENV
echo "TG_EXE=$HOME/.tangram-ci/bin/tangram" >> $GITHUB_ENV

- name: Configure Tangram
run: |
mkdir -p "$TANGRAM_CI_DIR/bin"
cat > "$TANGRAM_CI_DIR/config.json" << 'EOF'
{
"remotes": []
}
EOF
cat > "$TANGRAM_CI_DIR/bin/tangram" << 'EOF'
#!/bin/sh
exec tangram --directory "$TANGRAM_CI_DIR/.tangram" --config "$TANGRAM_CI_DIR/config.json" "$@"
EOF
chmod +x "$TANGRAM_CI_DIR/bin/tangram"

- name: Release packages
if: matrix.enabled
shell: bash
run: |
bun run auto --release --sequential
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
node_modules
tangram.lock
target
Claude.md
Loading