Skip to content

2 progress bars (#12) #25

2 progress bars (#12)

2 progress bars (#12) #25

name: Compile Rust
on:
push:
tags:
- "*.*.*"
jobs:
build_windows:
name: Compile Examples for Windows
runs-on: windows-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Setup Rust for Windows
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
target: x86_64-pc-windows-msvc
- name: Compile Examples for Windows
run: cargo build --examples --release
- name: Upload to Release
uses: actions/upload-artifact@v2
with:
name: examples_windows-artifact
path: |
target/release/examples/main.exe
target/release/examples/basic.exe
target/release/examples/all.exe
target/release/examples/multi_spinner.exe
build_unix:
name: Compile Examples for Unix
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Setup Rust for Unix
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
target: x86_64-unknown-linux-gnu
- name: Compile Examples for Unix
run: cargo build --examples --release
- name: Upload to Release
uses: actions/upload-artifact@v2
with:
name: examples_unix-artifact
path: |
target/release/examples/main
target/release/examples/basic
target/release/examples/all
target/release/examples/multi_spinner
release:
needs: [build_windows, build_unix]
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Git
run: git fetch --tags
- name: Display release version
run: |
echo "Release version: ${{ env.TAG }}"
- name: Download Artifact
uses: actions/download-artifact@v2
with:
name: examples_windows-artifact
path: examples/windows
- name: Download Artifact
uses: actions/download-artifact@v2
with:
name: examples_unix-artifact
path: examples/unix
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ env.TAG }}
name: "Release ${{ env.TAG }}"
files: |
examples/unix/*
examples/windows/*
token: ${{ secrets.GITHUB_TOKEN }}
append_body: true