mirror of
https://github.com/thepigeongenerator/mcaselector-lite.git
synced 2025-12-17 09:25:44 +01:00
implement workflows for the most part
workflows fail immediately when pushing, started filling them. "validate" currently has a placeholder, "release" is still unable to compile due to the clang dependency. Will fix these in the next commit.
This commit is contained in:
62
.github/workflows/release.yaml
vendored
62
.github/workflows/release.yaml
vendored
@@ -0,0 +1,62 @@
|
|||||||
|
name: release
|
||||||
|
on:
|
||||||
|
release:
|
||||||
|
branches:
|
||||||
|
- $default-branch
|
||||||
|
types:
|
||||||
|
- published
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
release_tag:
|
||||||
|
required: true
|
||||||
|
description: the tag to release for
|
||||||
|
default: ""
|
||||||
|
jobs:
|
||||||
|
compile_linux-x86_64:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
OUT: mcaselector-lite-linux-x86_64-${{github.event.release.tag_name || github.event.inputs.release_tag}}.zip
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4 # clone the repo
|
||||||
|
- name: install clang
|
||||||
|
run: |
|
||||||
|
sudo apt update
|
||||||
|
sudo apt install clang
|
||||||
|
# compile the binary
|
||||||
|
- run: make compile ARCH=linux-x86_64
|
||||||
|
- run: -rv zip ${{env.OUT}} bin/linux-x86_64/rel/*
|
||||||
|
# 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}}
|
||||||
|
compile_win-x86_64:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
OUT: mcaselector-lite-win-x86_64-${{github.event.release.tag_name || github.event.inputs.release_tag}}.zip
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4 # clone the repo
|
||||||
|
- name: install clang
|
||||||
|
run: |
|
||||||
|
sudo apt update
|
||||||
|
sudo apt install clang
|
||||||
|
# compile the binary
|
||||||
|
- run: make compile ARCH=win-x86_64
|
||||||
|
- run: -rv zip ${{env.OUT}} bin/win-x86_64/rel/*
|
||||||
|
# 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}}
|
||||||
|
|||||||
15
.github/workflows/validate.yaml
vendored
15
.github/workflows/validate.yaml
vendored
@@ -0,0 +1,15 @@
|
|||||||
|
name: release
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- dev
|
||||||
|
- $default-branch
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- dev
|
||||||
|
- $default-branch
|
||||||
|
jobs:
|
||||||
|
tmp:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- run: echo Hello, World
|
||||||
|
|||||||
Reference in New Issue
Block a user