Skip to content

ci: auto-publish release on tag #6

ci: auto-publish release on tag

ci: auto-publish release on tag #6

Workflow file for this run

on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
jobs:
release:
name: Release - ${{ matrix.platform.release_for }}
strategy:
matrix:
platform:
- release_for: Linux-x86_64
os: ubuntu-22.04
os_name: ubuntu-22.04
target: x86_64-unknown-linux-gnu
bin: multibrowse
name: multibrowse-${{ github.ref_name}}-ubuntu-22.04
command: build
- release_for: Windows-x86_64
os: windows-latest
os_name: win11
target: x86_64-pc-windows-msvc
bin: multibrowse.exe
name: multibrowse-${{ github.ref_name }}-win11.exe
command: build
- release_for: macOS-x86_64
os: macOS-latest
os_name: macos
target: aarch64-apple-darwin
bin: multibrowse
name: multibrowse-${{ github.ref_name}}-macos-arm64
command: build
runs-on: ${{ matrix.platform.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build binary
uses: houseabsolute/actions-rust-cross@v0
with:
command: ${{ matrix.platform.command }}
target: ${{ matrix.platform.target }}
args: "--locked --release"
strip: true
- name: Move binaries
shell: bash
run: mv target/${{ matrix.platform.target }}/release/${{ matrix.platform.bin }} ${{ matrix.platform.name }}
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: multibrowse-${{ github.ref_name }}-${{ matrix.platform.os_name }}
path: "multibrowse-*"
- name: Publish release
uses: softprops/action-gh-release@v1
with:
draft: true
files: "multibrowse-*"