Skip to content

More formatting!

More formatting! #23

Workflow file for this run

name: Rust
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
BUILD_TYPE: Release
jobs:
build_and_publish:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
# Check out the repository (basically downloads the source code)
- uses: actions/checkout@v3
# Build
- name: Build
run: cargo build --release --verbose
# Create Artifact
- name: Create Artifact (non-windows)
run: |
mkdir ${{ matrix.os }}-release
cp target/release/mandelbrot-rust ${{ matrix.os }}-release/
if: matrix.os != 'windows-latest'
- name: Create Artifact (windows)
run: |
mkdir ${{ matrix.os }}-release
cp target/release/mandelbrot-rust.exe ${{ matrix.os }}-release/
if: matrix.os == 'windows-latest'
# ZIP Artifact
- name: ZIP Artifact (non-windows)
run: |
zip -r ${{ matrix.os }}.zip ${{ matrix.os }}-release/
if: matrix.os != 'windows-latest'
- name: ZIP Artifact (windows)
run: |
7z a "${{ matrix.os }}.zip" "${{ matrix.os }}-release/"
if: matrix.os == 'windows-latest'
# Publish Artifact
- name: Publish Artifact
uses: actions/upload-artifact@v3
with:
retention-days: 1
name: ${{ matrix.os }}
path: ${{ matrix.os }}.zip
release:
name: "Release"
needs: build_and_publish
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v2
- name: Create Release
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
prerelease: false
title: "Latest (development) Build"
files: |
macos-latest/macos-latest.zip
ubuntu-latest/ubuntu-latest.zip
windows-latest/windows-latest.zip