mirror of
https://github.com/thepigeongenerator/mcaselector-lite.git
synced 2025-12-17 09:55:45 +01:00
-j tells make to not set a limit to the amount of jobs it can use parralel to one another. We just gotta make sure the makefile supports the paralelsation correctly, currently it should be.
44 lines
1.2 KiB
YAML
44 lines
1.2 KiB
YAML
name: release
|
|
on:
|
|
release:
|
|
types:
|
|
- published
|
|
workflow_dispatch:
|
|
inputs:
|
|
release_tag:
|
|
required: true
|
|
description: the tag to release for
|
|
default: ""
|
|
jobs:
|
|
compile:
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: ghcr.io/thepigeongenerator/mcaselector-lite:latest
|
|
needs: install-deps
|
|
strategy:
|
|
matrix:
|
|
arch:
|
|
- linux-x86_64
|
|
- win-x86_64
|
|
env:
|
|
OUT: ${{github.workspace}}/mcaselector-lite-${{matrix.arch}}-${{github.event.release.tag_name || github.event.inputs.release_tag}}.zip
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- run: make compile ARCH=${{matrix.arch}} -j
|
|
- name: compress binary information
|
|
run: |
|
|
cd "${{github.workspace}}/bin/${{matrix.arch}}/rel/"
|
|
zip -rv "${{env.OUT}}" *
|
|
cd -
|
|
# upload to the release
|
|
- name: upload release
|
|
uses: softprops/action-gh-release@v2
|
|
if: ${{!env.ACT}}
|
|
with:
|
|
files: ${{env.OUT}}
|
|
# upload to the artefact directory if running locally with act
|
|
- uses: actions/upload-artifact@v4
|
|
if: ${{env.ACT}}
|
|
with:
|
|
path: ${{env.OUT}}
|