Skip to content

Release publish fix #10

Release publish fix

Release publish fix #10

Workflow file for this run

# Copilot generated GitHub Actions workflow for macOS
# Thank you Bing's Copilot!
name: Rust Tests, Build, and Release
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
mac-test:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Install LLVM tools
run: brew install llvm
- name: Install cargo-llvm-cov
run: cargo install cargo-llvm-cov
- name: Run tests with coverage
run: cargo llvm-cov --workspace --lcov --output-path ./target/lcov.info
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4.0.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
mac-build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Install cargo bundle
run: cargo install cargo-bundle
- name: Build macOS binary
run: cargo bundle --release --features "gui openai drama_llama"
mac-release:
needs: [mac-test, mac-build]
runs-on: macos-latest
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
steps:
- uses: actions/checkout@v2
- name: Create macOS release bundle
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.sha }}
release_name: Release ${{ github.sha }}
draft: false
prerelease: false
- name: Upload macOS release bundle
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: target/release/bundle/osx/Weave.app
asset_name: Weave.app
asset_content_type: application/octet-stream
linux-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install LLVM tools
run: sudo apt-get install llvm
- name: Install cargo-llvm-cov
run: cargo install cargo-llvm-cov
- name: Run tests with coverage
run: cargo llvm-cov --workspace --lcov --output-path ./target/lcov.info
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4.0.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
linux-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install cargo bundle
run: cargo install cargo-bundle
- name: Build Linux binary
run: cargo bundle --release --features "gui openai drama_llama"
linux-release:
needs: [linux-test, linux-build]
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
steps:
- uses: actions/checkout@v2
- name: Create Linux release bundle
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.sha }}
release_name: Release ${{ github.sha }}
draft: false
prerelease: false
- name: Upload Linux release bundle
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: target/release/bundle/linux/Weave
asset_name: Weave
asset_content_type: application/octet-stream
windows-test:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Install LLVM tools
run: choco install llvm
- name: Install cargo-llvm-cov
run: cargo install cargo-llvm-cov
- name: Run tests with coverage
run: cargo llvm-cov --workspace --lcov --output-path ./target/lcov.info
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4.0.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
windows-build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Install cargo bundle
run: cargo install cargo-bundle
- name: Build Windows binary
run: cargo bundle --release --features "gui openai drama_llama"
windows-release:
needs: [windows-test, windows-build]
runs-on: windows-latest
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
steps:
- uses: actions/checkout@v2
- name: Create Windows release bundle
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
with:
tag_name: ${{ github.sha }}
release_name: Release ${{ github.sha }}
draft: false
prerelease: false
- name: Upload Windows release bundle
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: target/release/bundle/windows/Weave.exe
asset_name: Weave.exe
asset_content_type: application/octet-stream