Skip to content

ReleaseAll

ReleaseAll #48

Workflow file for this run

name: ReleaseAll
on:
push:
tags:
- '*'
env:
CARGO_TERM_COLOR: always
jobs:
build:
env:
FILE_NAME: flora_parsing
runs-on: ${{ matrix.os }}
permissions: write-all
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest,macOS-latest,windows-latest]
steps:
- uses: actions/checkout@v4
- name: Run tests
run: cargo test --verbose
- name: release
run: cargo build --verbose --release
- name: rename
if: matrix.os != 'windows-latest'
run: mv ./target/release/${{ env.FILE_NAME }} ./target/release/${{ matrix.os }}-${{ env.FILE_NAME }}
- name: rename windows
if: matrix.os == 'windows-latest'
run: mv ./target/release/${{ env.FILE_NAME }}.exe ./target/release/${{ matrix.os }}-${{ env.FILE_NAME }}.exe
- name: upload windows
if: matrix.os == 'windows-latest'
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}-${{ env.FILE_NAME }}
path: ./target/release/${{ matrix.os }}-${{ env.FILE_NAME }}.exe
- uses: actions/upload-artifact@v4
if: matrix.os != 'windows-latest'
with:
name: ${{ matrix.os }}-flora_parsing
path: ./target/release/${{ matrix.os }}-${{ env.FILE_NAME }}
release:
needs: build
runs-on: ubuntu-latest
permissions: write-all
strategy:
fail-fast: false
steps:
- name: Download all workflow run artifacts
uses: actions/download-artifact@v4
- name: Display structure of downloaded files
run: ls -R
- uses: ncipollo/release-action@v1
with:
artifacts: './ubuntu-latest-flora_parsing/ubuntu-latest-flora_parsing,./macOS-latest-flora_parsing/macOS-latest-flora_parsing,./windows-latest-flora_parsing/windows-latest-flora_parsing.exe'