2023-01-17 21:35:35 +00:00
|
|
|
---
|
|
|
|
name: "Version build"
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
tags:
|
|
|
|
- "v*.*.*"
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
include:
|
|
|
|
- os: ubuntu-latest
|
|
|
|
target: x86_64-unknown-linux-gnu
|
|
|
|
- os: macos-latest
|
|
|
|
target: x86_64-apple-darwin
|
|
|
|
- os: macos-latest
|
|
|
|
target: aarch64-apple-darwin
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2023-01-24 13:20:29 +00:00
|
|
|
uses: actions/checkout@v3
|
2023-01-17 21:35:35 +00:00
|
|
|
|
|
|
|
- uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
toolchain: stable
|
|
|
|
target: ${{ matrix.target }}
|
|
|
|
|
|
|
|
- uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: build
|
|
|
|
args: --release --all-features --target=${{ matrix.target }}
|
|
|
|
|
|
|
|
- name: Archive build artifacts
|
2023-01-24 13:20:29 +00:00
|
|
|
uses: actions/upload-artifact@v3
|
2023-01-17 21:35:35 +00:00
|
|
|
with:
|
|
|
|
name: build-${{matrix.target}}
|
2023-02-12 08:30:06 +00:00
|
|
|
path: ${{ github.workspace }}/target/${{ matrix.target }}/release/dudo
|
2023-01-17 21:35:35 +00:00
|
|
|
|
|
|
|
release:
|
|
|
|
needs: build
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2023-01-24 13:20:29 +00:00
|
|
|
uses: actions/checkout@v3
|
2023-01-17 21:35:35 +00:00
|
|
|
|
|
|
|
- name: Download artifact
|
2023-01-24 13:20:29 +00:00
|
|
|
uses: actions/download-artifact@v3
|
2023-01-17 21:35:35 +00:00
|
|
|
|
|
|
|
- name: Set version variable
|
|
|
|
run: echo "CLIN_VERSION=${GITHUB_REF##*/}" >> $GITHUB_ENV
|
|
|
|
|
|
|
|
- name: Rename release to avoid name conflict
|
|
|
|
run: ./scripts/rename_releases.sh
|
|
|
|
|
|
|
|
- name: Release
|
|
|
|
uses: softprops/action-gh-release@v1
|
|
|
|
with:
|
|
|
|
files: release/*
|