Skip to content

bump ver and remove windwos from binaries as it breaks and idk why, b… #10

bump ver and remove windwos from binaries as it breaks and idk why, b…

bump ver and remove windwos from binaries as it breaks and idk why, b… #10

Workflow file for this run

name: Release
on:
push:
tags:
- "v*"
workflow_dispatch:
permissions:
contents: write
jobs:
create_release:
name: Create GitHub Release
runs-on: ubuntu-latest
outputs:
upload_url: ${{ steps.create.outputs.upload_url }}
steps:
- name: Create GitHub Release
id: create
uses: softprops/action-gh-release@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag_name: ${{ github.ref }}
name: Release ${{ github.ref_name }}
draft: false
prerelease: false
generate_release_notes: true
build:
name: Build and Upload (${{ matrix.arch }})
needs: create_release
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
arch: linux-x86_64
ext: tar.gz
- os: macos-latest
target: x86_64-apple-darwin
arch: macos-x86_64
ext: tar.gz
- os: macos-latest
target: aarch64-apple-darwin
arch: macos-arm64
ext: tar.gz
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Build project
run: cargo build --release --target ${{ matrix.target }}
- name: Prepare artifact
shell: bash
run: |
mkdir -p artifacts
BIN_NAME="cube-type-extract-rs"
cp target/${{ matrix.target }}/release/$BIN_NAME artifacts/
if [[ "${{ matrix.ext }}" == "zip" ]]; then
cd artifacts && zip cube-type-extract-rs-${{ matrix.arch }}.zip $BIN_NAME && rm $BIN_NAME && cd ..
else
cd artifacts && tar -czvf cube-type-extract-rs-${{ matrix.arch }}.tar.gz $BIN_NAME && rm $BIN_NAME && cd ..
fi
- name: Upload artifact to GitHub Release
uses: softprops/action-gh-release@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
upload_url: ${{ needs.create_release.outputs.upload_url }}
files: artifacts/*