forked from LiteLDev/LeviLamina
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
1,068 additions
and
290 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
github: LiteLDev | ||
open_collective: liteloaderbds | ||
custom: | ||
- https://afdian.net/@liteldev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: Bug Report | ||
description: Create a report to help us improve | ||
title: "[Bug]: " | ||
labels: ["bug"] | ||
body: | ||
- type: textarea | ||
attributes: | ||
label: Describe the bug | ||
description: A clear and concise description of what the bug is. | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
attributes: | ||
label: To Reproduce | ||
description: Steps to reproduce the behavior. | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
attributes: | ||
label: Expected behavior | ||
description: A clear and concise description of what you expected to happen. | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
attributes: | ||
label: Screenshots | ||
description: If applicable, add screenshots to help explain your problem. | ||
|
||
- type: input | ||
attributes: | ||
label: Platform | ||
description: The platform you are using. (e.g. Windows 10, macOS 10.15, Ubuntu 20.04) | ||
|
||
- type: input | ||
attributes: | ||
label: Version | ||
description: The version of the application you are using. (e.g. 1.0.0) | ||
|
||
- type: textarea | ||
attributes: | ||
label: Additional context | ||
description: Add any other context about the problem here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Feature request | ||
description: Suggest an idea for this project | ||
title: "[Feature]: " | ||
labels: ["enhancement"] | ||
body: | ||
- type: textarea | ||
attributes: | ||
label: Is your feature request related to a problem? Please describe. | ||
description: A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
attributes: | ||
label: Describe the solution you'd like | ||
description: A clear and concise description of what you want to happen. | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
attributes: | ||
label: Describe alternatives you've considered | ||
description: A clear and concise description of any alternative solutions or features you've considered. | ||
|
||
- type: textarea | ||
attributes: | ||
label: Additional context | ||
description: Add any other context or screenshots about the feature request here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
## What does this PR do? | ||
|
||
|
||
|
||
## Which issues does this PR resolve? | ||
|
||
|
||
|
||
## Checklist before merging | ||
|
||
Thank you for your contribution to the repository. | ||
Before submitting this PR, please make sure: | ||
|
||
- [ ] Your code builds clean without any errors or warnings | ||
- [ ] Your code follows the code style of this repository (see the wiki) | ||
- [ ] You have tested all functions | ||
- [ ] You have not used code without license | ||
- [ ] You have added statement for third-party code |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,142 +1,52 @@ | ||
name: Build | ||
env: | ||
VERSION: v0.0.0 | ||
ZIP_SHA256: "" | ||
DLL_SHA256: "" | ||
PDB_SHA256: "" | ||
LIB_SHA256: "" | ||
on: | ||
push: | ||
paths: | ||
- "**.cpp" | ||
- "**.cc" | ||
- "**.cxx" | ||
- "**.c" | ||
- "**.hpp" | ||
- "**.hh" | ||
- "**.hxx" | ||
- "**.h" | ||
- ".github/workflows/build.yml" | ||
- "**/*.lua" | ||
pull_request: | ||
release: | ||
types: | ||
- created | ||
push: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: windows-latest | ||
build-docs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Setup XMake | ||
uses: xmake-io/github-action-setup-xmake@v1 | ||
with: | ||
xmake-version: latest | ||
|
||
- name: Cache XMake | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/AppData/Local/.xmake | ||
./.xmake | ||
key: ${{ runner.os }}-xmake-${{ github.sha }} | ||
restore-keys: | | ||
${{ runner.os }}-xmake- | ||
- name: Update XMake Repository | ||
run: xmake repo -u | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Get Release Version Tag | ||
if: github.event_name == 'release' | ||
run: echo "VERSION=${{ github.ref_name }}" >> $env:GITHUB_ENV | ||
- run: | | ||
pip install -r requirements.txt | ||
- name: Get Previous Tag | ||
if: github.event_name != 'release' | ||
id: previoustag | ||
run: | | ||
$tag = ((git ls-remote -t --refs --sort=-v:refname -q | select -first 1) -split "/")[2] | ||
if ($tag -eq "" -or $tag -eq $null) { | ||
$tag = "v0.0.0" | ||
} | ||
echo "tag=$tag" >> $env:GITHUB_OUTPUT | ||
- run: | | ||
mkdocs build | ||
- name: Set Pseudo Version | ||
if: github.event_name != 'release' | ||
run: | | ||
$date = (Get-Date -Format "yyyyMMddHHmmss") | ||
$commit = git rev-parse --short HEAD | ||
$previous_tag = "${{ steps.previoustag.outputs.tag }}" | ||
echo "VERSION=$previous_tag-$date-$commit" >> $env:GITHUB_ENV | ||
- name: Build liteloader | ||
run: | | ||
xmake f -p windows -m release -a x64 --ccache=n -y -v | ||
xmake -w -y | ||
- name: Prepare Artifacts | ||
run: | | ||
mkdir artifacts | ||
cp build/windows/x64/release/LiteLoader.dll artifacts | ||
cp build/windows/x64/release/LiteLoader.lib artifacts | ||
cp build/windows/x64/release/LiteLoader.pdb artifacts | ||
mv artifacts liteloader-${{ env.VERSION }}-windows-amd64 | ||
mkdir artifacts | ||
mv liteloader-${{ env.VERSION }}-windows-amd64 artifacts/ | ||
- name: Upload Artifacts | ||
uses: actions/upload-artifact@v3 | ||
- uses: actions/upload-pages-artifact@v2 | ||
with: | ||
name: liteloader-${{ env.VERSION }}-windows-amd64 | ||
path: artifacts | ||
|
||
upload-to-release: | ||
name: Upload to Release | ||
needs: | ||
- build | ||
path: site/ | ||
|
||
deploy-docs: | ||
# if: github.ref == 'refs/heads/main' && github.event_name == 'push' | ||
if: github.ref == 'refs/heads/develop' && github.event_name == 'push' # For development only | ||
needs: build-docs | ||
permissions: | ||
id-token: write | ||
pages: write | ||
runs-on: ubuntu-latest | ||
if: github.event_name == 'release' | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/deploy-pages@v2 | ||
|
||
build-liteloader: | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Get Version | ||
run: echo "VERSION=${{ github.ref_name }}" >> $GITHUB_ENV | ||
- uses: xmake-io/github-action-setup-xmake@v1 | ||
|
||
- name: Download Artifacts | ||
uses: actions/download-artifact@v3 | ||
- run: | | ||
xmake repo --update | ||
- run: | | ||
xmake config --arch=x64 --plat=windows --mode=release --verbose --yes | ||
- name: Compress Artifacts | ||
id: compress | ||
run: | | ||
mv liteloader-${{ env.VERSION }}-windows-amd64 artifacts | ||
mv artifacts/liteloader-${{ env.VERSION }}-windows-amd64 . | ||
cp -r include liteloader-${{ env.VERSION }}-windows-amd64/ | ||
zip -r liteloader-${{ env.VERSION }}-windows-amd64.zip liteloader-${{ env.VERSION }}-windows-amd64 | ||
echo "ZIP_SHA256=$(sha256sum liteloader-${{ env.VERSION }}-windows-amd64.zip | cut -d ' ' -f 1)" >> $GITHUB_ENV | ||
echo "DLL_SHA256=$(sha256sum liteloader-${{ env.VERSION }}-windows-amd64/LiteLoader.dll | cut -d ' ' -f 1)" >> $GITHUB_ENV | ||
echo "LIB_SHA256=$(sha256sum liteloader-${{ env.VERSION }}-windows-amd64/LiteLoader.lib | cut -d ' ' -f 1)" >> $GITHUB_ENV | ||
echo "PDB_SHA256=$(sha256sum liteloader-${{ env.VERSION }}-windows-amd64/LiteLoader.pdb | cut -d ' ' -f 1)" >> $GITHUB_ENV | ||
shell: bash | ||
- run: | | ||
xmake --warning --yes | ||
- name: Upload Release Assets | ||
uses: softprops/action-gh-release@v1 | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
append_body: true | ||
files: | | ||
liteloader-${{ env.VERSION }}-windows-amd64.zip | ||
liteloader-${{ env.VERSION }}-windows-amd64/LiteLoader.dll | ||
liteloader-${{ env.VERSION }}-windows-amd64/LiteLoader.lib | ||
liteloader-${{ env.VERSION }}-windows-amd64/LiteLoader.pdb | ||
body: | | ||
--- | ||
| File | SHA256 | | ||
| :--------------------------------------------- | :-------------------- | | ||
| liteloader-${{ env.VERSION }}-windows-amd64.zip | ${{ env.ZIP_SHA256 }} | | ||
| LiteLoader.dll | ${{ env.DLL_SHA256 }} | | ||
| LiteLoader.lib | ${{ env.LIB_SHA256 }} | | ||
| LiteLoader.pdb | ${{ env.PDB_SHA256 }} | | ||
name: liteloader-windows-x64-${{ github.sha }} | ||
path: build/windows/x64/release/ |
Oops, something went wrong.