Skip to content

fix mac & linux compilation #55

fix mac & linux compilation

fix mac & linux compilation #55

Workflow file for this run

name: release
# runs whenever a version git tag is created
on:
push:
tags:
- "*.*.*" # e.g 1.0.1
workflow_dispatch:
jobs:
draft:
runs-on: ubuntu-latest
outputs:
upload: ${{ steps.create-release.outputs.upload_url }}
steps:
- id: create-release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
draft: true
prerelease: true
body: "# Changes"
# windows:
# needs: draft
# runs-on: windows-latest
# steps:
# - uses: actions/checkout@v3
# - uses: Swatinem/rust-cache@v1
# - name: build
# run: cargo build -r
# - name: upload
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# upload_url: ${{ needs.draft.outputs.upload }}
# asset_path: target/release/stove.exe
# asset_name: stove.exe
# asset_content_type: application/x-msdownload
macos:
needs: draft
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v1
- name: build
run: cargo build -r
- name: upload
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.draft.outputs.upload }}
asset_path: target/release/stove
asset_name: stove-macos
asset_content_type: application/octet-stream
linux:
needs: draft
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v1
- name: install deps
run: |
sudo apt-get update; sudo apt-get install pkg-config libx11-dev libasound2-dev libudev-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libwayland-dev libxkbcommon-dev libgtk-3-dev
- name: build
run: cargo build -r
- name: upload
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.draft.outputs.upload }}
asset_path: target/release/stove
asset_name: stove-linux
asset_content_type: application/octet-stream