Skip to content

fixup! Comment the update_profiles_with_api and remove `build-windo… #10

fixup! Comment the update_profiles_with_api and remove `build-windo…

fixup! Comment the update_profiles_with_api and remove `build-windo… #10

Workflow file for this run

name: Rust
on:
push:
env:
CARGO_TERM_COLOR: always
jobs:
build-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Mihomo
run: |
wget --output-document mihomo.gz https://github.com/MetaCubeX/mihomo/releases/download/v1.18.0/mihomo-linux-amd64-v1.18.0.gz
gunzip mihomo.gz
chmod +x mihomo
nohup ./mihomo -d Example -f Example/basic_clash_config.yaml &
- name: Cache Target
uses: actions/cache@v4
with:
path: |
./clashtui/target
~/.cargo
key: ci-${{ runner.os }}-${{ hashFiles('./clashtui/Cargo.lock') }}
restore-keys: |
ci-${{ runner.os }}-${{ hashFiles('./clashtui/Cargo.lock') }}
ci-${{ runner.os }}-
- name: Download Dependencies
run: cd clashtui && cargo fetch
- name: Run tests
run: cd clashtui && cargo test --all --verbose
- name: Build
run: cd clashtui && cargo build --verbose --locked && cargo build --release --locked
- name: Build Version
run: cd clashtui && cargo r -- -v
- name: Pre Upload
run: |
mkdir artifacts
mv ./clashtui/target/release/clashtui ./artifacts/clashtui.release
mv ./clashtui/target/debug/clashtui ./artifacts/clashtui.debug
- name: upload artifacts
uses: actions/upload-artifact@v4
with:
name: Linux_Build
path: artifacts
retention-days: 5
release:
runs-on: ubuntu-latest
needs: [build-linux]
if: startsWith(github.ref, 'refs/tags/')
permissions:
contents: write
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
merge-multiple: true
path: ./artifacts
- name: Create Release
uses: softprops/action-gh-release@v1
with:
files: |
artifacts/*