Skip to content

chore: update CI #2

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

Merged
merged 1 commit into from
Apr 20, 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
20 changes: 12 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: CI
on:
push:
branches: [ main ]
tags: [ 'v*.*.*' ]
pull_request:
branches: [ main, dev ]

Expand All @@ -11,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout mc-mcp
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Rust
uses: actions-rs/toolchain@v1
Expand Down Expand Up @@ -39,14 +40,18 @@ jobs:
- name: Run tests
run: cargo test --all --release

build-prebuilt-index:
build-and-release-index:
needs: build-and-test
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout mc-mcp
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Checkout metacontract-docs
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: metacontract/mc
path: mc
Expand All @@ -66,8 +71,7 @@ jobs:
- name: Compress index
run: gzip -9 -f artifacts/prebuilt_index.jsonl

- name: Upload prebuilt index artifact
uses: actions/upload-artifact@v4
- name: Create Release and Upload Asset
uses: softprops/action-gh-release@v1
with:
name: prebuilt_index.jsonl.gz
path: artifacts/prebuilt_index.jsonl.gz
files: artifacts/prebuilt_index.jsonl.gz
Loading