1
0
Mirror von https://github.com/Chaoscaot/schemsearch synchronisiert 2024-11-05 12:00:06 +01:00
schemsearch/.github/workflows/release-build.yml

53 Zeilen
1.5 KiB
YAML

2023-03-16 19:27:48 +01:00
name: Release Build
on:
release:
types:
- published
env:
CARGO_TERM_COLOR: always
jobs:
build:
2023-03-16 20:09:12 +01:00
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
2023-03-16 19:27:48 +01:00
steps:
- uses: actions/checkout@v3
- name: Build
run: cargo build --verbose --release
- name: Create Tarball
2023-03-16 20:09:12 +01:00
if: ${{ matrix.os != 'windows-latest' }}
2023-03-16 20:14:52 +01:00
run: tar -czvf schemsearch-cli.tar.gz -C target/release/schemsearch-cli
2023-03-16 20:09:12 +01:00
- name: upload linux/darwin artifact
if: ${{ matrix.os != 'windows-latest' }}
2023-03-16 19:27:48 +01:00
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
2023-03-16 19:51:59 +01:00
upload_url: ${{ github.event.release.upload_url }}
2023-03-16 20:09:12 +01:00
asset_path: schemsearch-cli-${{ matrix.os }}.tar.gz
asset_name: schemsearch-cli-${{ matrix.os }}.tar.gz
2023-03-16 19:27:48 +01:00
asset_content_type: application/gzip
2023-03-16 20:09:12 +01:00
- uses: vimtor/action-zip@v1
name: Compress
if: ${{ matrix.os == 'windows-latest' }}
with:
files: target/release/schemsearch-cli.exe
dest: schemsearch-cli-${{ matrix.os }}.zip
- name: upload windows artifact
if: ${{ matrix.os == 'windows-latest' }}
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ github.event.release.upload_url }}
2023-03-16 20:14:52 +01:00
asset_path: schemsearch-cli.tar.gz
2023-03-16 20:09:12 +01:00
asset_name: schemsearch-cli-${{ matrix.os }}.zip
asset_content_type: application/zip