mirror of
https://github.com/Hopiu/lychee.git
synced 2026-04-27 00:14:46 +00:00
Create on-demand binaries (useful for debugging) (#1054)
This commit is contained in:
parent
49adfd08f6
commit
942ce2984a
2 changed files with 28 additions and 21 deletions
7
.github/workflows/ci.yml
vendored
7
.github/workflows/ci.yml
vendored
|
|
@ -20,9 +20,7 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
- uses: taiki-e/install-action@nextest
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
- name: Run tests
|
||||
|
|
@ -32,9 +30,8 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions-rs/toolchain@v1
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
toolchain: stable
|
||||
components: clippy
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
- name: Run cargo fmt (check if all code is rustfmt-ed)
|
||||
|
|
|
|||
42
.github/workflows/release.yml
vendored
42
.github/workflows/release.yml
vendored
|
|
@ -4,6 +4,7 @@ on:
|
|||
types:
|
||||
- edited
|
||||
- published
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
|
|
@ -21,7 +22,7 @@ jobs:
|
|||
|
||||
- name: Get release
|
||||
id: get_release
|
||||
uses: bruceadams/get-release@v1.2.2
|
||||
uses: bruceadams/get-release@v1.3.2
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ github.token }}
|
||||
|
||||
|
|
@ -60,11 +61,7 @@ jobs:
|
|||
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: minimal
|
||||
toolchain: stable
|
||||
default: true
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
|
||||
- name: Build ${{ matrix.target }}
|
||||
uses: actions-rs/cargo@v1
|
||||
|
|
@ -90,17 +87,20 @@ jobs:
|
|||
upload_url: ${{needs.prepare.outputs.upload_url}}
|
||||
asset_content_type: application/gzip
|
||||
|
||||
- name: Upload binary as artifact
|
||||
if: github.event_name == 'workflow_dispatch'
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: lychee-${{ github.sha }}-${{ matrix.target }}.tar.gz
|
||||
path: target/${{ matrix.target }}/release/lychee.tar.gz
|
||||
|
||||
macos:
|
||||
runs-on: macos-latest
|
||||
needs: prepare
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: minimal
|
||||
toolchain: stable
|
||||
default: true
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
|
||||
- name: Build binary
|
||||
uses: actions-rs/cargo@v1
|
||||
|
|
@ -128,6 +128,13 @@ jobs:
|
|||
upload_url: ${{needs.prepare.outputs.upload_url}}
|
||||
asset_content_type: application/octet-stream
|
||||
|
||||
- name: Upload binary as artifact
|
||||
if: github.event_name == 'workflow_dispatch'
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: lychee-${{ github.sha }}-macos-x86_64.dmg
|
||||
path: target/release/lychee.dmg
|
||||
|
||||
windows:
|
||||
runs-on: windows-latest
|
||||
needs: prepare
|
||||
|
|
@ -143,11 +150,7 @@ jobs:
|
|||
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: minimal
|
||||
toolchain: stable
|
||||
default: true
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
|
||||
- name: Build binary
|
||||
uses: actions-rs/cargo@v1
|
||||
|
|
@ -165,3 +168,10 @@ jobs:
|
|||
asset_path: target/release/lychee.exe
|
||||
upload_url: ${{needs.prepare.outputs.upload_url}}
|
||||
asset_content_type: application/octet-stream
|
||||
|
||||
- name: Upload binary as artifact
|
||||
if: github.event_name == 'workflow_dispatch'
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: lychee-${{ github.sha }}-windows-x86_64.exe
|
||||
path: target/release/lychee.exe
|
||||
|
|
|
|||
Loading…
Reference in a new issue