Skip to content

fixing workflow2

fixing workflow2 #4

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*'
jobs:
build-linux:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
target: x86_64-unknown-linux-gnu
override: true
- name: Build
run: cargo build --release --target x86_64-unknown-linux-gnu
- name: Package
run: tar -czvf which-allowed-linux.tar.gz -C target/x86_64-unknown-linux-gnu/release which-allowed
env:
package_name: which-allowed-linux.tar.gz
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: which-allowed-linux.tar.gz
asset_name: which-allowed-linux.tar.gz
asset_content_type: application/zip
build-macos-x86_64:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
target: x86_64-apple-darwin
override: true
- name: Build
run: cargo build --release --target x86_64-apple-darwin
- name: Package
run: tar -czvf which-allowed-macos-x86_64.tar.gz -C target/x86_64-apple-darwin/release which-allowed
env:
package_name: which-allowed-macos-x86_64.tar.gz
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: which-allowed-macos-x86_64.tar.gz
asset_name: which-allowed-macos-x86_64.tar.gz
asset_content_type: application/zip
build-macos-aarch64:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
target: aarch64-apple-darwin
override: true
- name: Build
run: cargo build --release --target aarch64-apple-darwin
- name: Package
run: tar -czvf which-allowed-macos-aarch64.tar.gz -C target/aarch64-apple-darwin/release which-allowed
env:
package_name: which-allowed-macos-aarch64.tar.gz
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: which-allowed-macos-aarch64.tar.gz
asset_name: which-allowed-macos-aarch64.tar.gz
asset_content_type: application/zip
build-windows:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
target: x86_64-pc-windows-gnu
override: true
- name: Install Dependencies
run: choco install mingw
- name: Build
run: cargo build --release --target x86_64-pc-windows-gnu
- name: Package
run: Compress-Archive -Path target\x86_64-pc-windows-gnu\release\which-allowed.exe -DestinationPath which-allowed-windows.zip
env:
package_name: which-allowed-windows.zip
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: which-allowed-windows.zip
asset_name: which-allowed-windows.zip
asset_content_type: application/zip