-
Notifications
You must be signed in to change notification settings - Fork 43
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
6 changed files
with
99 additions
and
4 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,91 @@ | ||
name: build cli | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
paths: | ||
- '.github/workflows/ci.yml' | ||
- 'source/cli/**' | ||
pull_request: | ||
paths: | ||
- '.github/workflows/ci.yml' | ||
- 'source/cli/**' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
meta: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
tag: ${{ steps.set_tag.outputs.tag }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- id: set_tag | ||
run: | | ||
echo tag=$(git describe --tags --match "v*" ${{ github.ref }} || git rev-parse --short HEAD) | tee -a $GITHUB_OUTPUT | ||
windows: | ||
needs: meta | ||
strategy: | ||
matrix: | ||
include: | ||
- msbuild_target: x64 | ||
lowercase_target: x64 | ||
# - msbuild_target: ARM64 | ||
# lowercase_target: arm64 | ||
env: | ||
MAABUILDER_TARGET_PLATFORM: ${{ matrix.msbuild_target }} | ||
runs-on: windows-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
|
||
- name: Download MaaFramework | ||
uses: robinraju/[email protected] | ||
with: | ||
repository: MaaAssistantArknights/MaaFramework | ||
latest: true | ||
fileName: "MAA-win-${{ matrix.msbuild_target }}*" | ||
out-file-path: "source/cli/${{ matrix.msbuild_target }}/Release" | ||
extract: true | ||
|
||
- run: ls -l source/cli/${{ matrix.msbuild_target }}/Release | ||
|
||
- name: Add msbuild to PATH | ||
uses: microsoft/setup-msbuild@v1 | ||
|
||
- name: Build MAA | ||
run: | | ||
MSBUILD source/cli/MAA1999_CLI.sln /t:rebuild /p:Configuration="Release" /p:Platform="${{ matrix.msbuild_target }}" /m /p:MAA_VERSION="${{ needs.meta.outputs.tag }}" | ||
- name: Install | ||
shell: bash | ||
run: | | ||
cd source/cli/${{ matrix.msbuild_target }}/Release | ||
mkdir -p install | ||
cp -r docs include resource MaaAgentBinary *.exe *.dll install | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: MAA1999-win-${{ matrix.msbuild_target }} | ||
path: source/cli/${{ matrix.msbuild_target }}/Release/install | ||
|
||
release: | ||
if: startsWith(github.ref, 'refs/tags/v') | ||
needs: [meta, windows] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
path: assets | ||
- run: | | ||
cd assets | ||
for f in *; do | ||
(cd $f && zip -r ../$f-${{ needs.meta.outputs.tag }}.zip .) | ||
done | ||
- uses: softprops/action-gh-release@v1 | ||
with: | ||
files: assets/* | ||
tag_name: ${{ needs.meta.outputs.tag }} |
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,3 +1,6 @@ | ||
[submodule "MaaFramework"] | ||
path = MaaFramework | ||
url = https://github.com/MaaAssistantArknights/MaaFramework.git | ||
[submodule "assets/MaaAgentBinary"] | ||
path = assets/MaaAgentBinary | ||
url = https://github.com/MaaAssistantArknights/MaaAgentBinary.git |
Submodule MaaFramework
updated
from 373acb to a4910d
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
Submodule MaaAgentBinary
added at
a1832c
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