Skip to content

Implement pre-release action #6

Implement pre-release action

Implement pre-release action #6

Workflow file for this run

---
name: "pre-release"
on:
push:
branches:
- main
jobs:
release:
name: Release - ${{ matrix.platform.release_for }}
strategy:
matrix:
platform:
- release_for: Linux-x86_64
os: ubuntu-20.04
target: x86_64-unknown-linux-gnu
bin: transport
name: transport-Linux-x86_64.tar.gz
command: build
- release_for: macOS-aarch64
os: macOS-latest
target: aarch64-apple-darwin
bin: transport
name: transport-Darwin-aarch64.tar.gz
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"
- name: Package as archive
shell: bash
run: |
cd target/${{ matrix.platform.target }}/release
tar czvf ../../../${{ matrix.platform.name }} ${{ matrix.platform.bin }}
cd -
- name: Publish GitHub release
uses: softprops/action-gh-release@v1
with:
draft: true
files: "transport-*"
# - uses: "marvinpinto/action-automatic-releases@latest"
# with:
# repo_token: "${{ github.token }}"
# automatic_release_tag: "latest"
# prerelease: true
# title: "Development Build"
# files: |
# target/${{ matrix.platform.target }}/release/${{ matrix.platform.bin }}