Skip to content
This repository has been archived by the owner on Sep 27, 2024. It is now read-only.

Workflow file for this run

on:
release:
types:
- published
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: xmake-io/github-action-setup-xmake@v1
- uses: actions/cache@v4
with:
path: |
~/AppData/Local/.xmake
key: xmake-${{ hashFiles('xmake.lua') }}
restore-keys: |
xmake-
- run: |
xmake repo -u
- run: |
xmake f -a x64 -m release -p windows -y
- run: |
xmake -w -y
- uses: actions/upload-artifact@v4
with:
name: ${{ github.event.repository.name }}-windows-x64-${{ github.sha }}
path: |
bin/
# SDK相关任务
- name: Create SDK directories
run: |
mkdir SDK
mkdir SDK/lib
mkdir SDK/include
- name: Copy include files to SDK
run: |
Copy-Item -Path include/* -Destination SDK/include/ -Recurse -Force
shell: pwsh
- name: Copy .lib files to SDK/lib
run: |
New-Item -Path SDK/lib -ItemType Directory -Force
Copy-Item -Path build/windows/x64/release/*.lib -Destination SDK/lib/ -Force
shell: pwsh
- uses: actions/upload-artifact@v4
with:
name: SDK-${{ github.sha }}
path: SDK
update-release-notes:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- id: extract-release-notes
uses: ffurrer2/extract-release-notes@v2
- uses: softprops/action-gh-release@v1
with:
body: |
${{ steps.extract-release-notes.outputs.release_notes }}
upload-to-release:
needs:
- build
- update-release-notes
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: ${{ github.event.repository.name }}-windows-x64-${{ github.sha }}
path: artifact
# Download SDK
- uses: actions/download-artifact@v4
with:
name: SDK-${{ github.sha }}
path: sdk-artifact
- run: |
cp CHANGELOG.md LICENSE README.md artifact/
- run: |
zip -r ../${{ github.event.repository.name }}-windows-x64.zip *
working-directory: artifact
# Zip SDK
- run: |
zip -r ../SDK-PermissionCore.zip *
working-directory: sdk-artifact
- uses: softprops/action-gh-release@v1
with:
files: |
${{ github.event.repository.name }}-windows-x64.zip
SDK-PermissionCore.zip