-
-
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
1 parent
126e8ce
commit e248b79
Showing
2 changed files
with
119 additions
and
8 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 |
---|---|---|
@@ -1,2 +1,94 @@ | ||
# build-and-sign-monogame-android | ||
Build and sign your MonoGame Android project for release. | ||
|
||
This action allows you to build and sign your MonoGame Android project for release. | ||
|
||
The action sets up `dotnet`, `msbuild`, and the `mgcb` build tool. | ||
It then builds the `Content` resources using `mgcb`, then builds and signs the | ||
game using `msbuild`, and finally uploads both the signed and unsigned `aab`s | ||
as artifacts to the workflow. | ||
|
||
If you're looking for an action that only builds your MonoGame project, check | ||
out [build-monogame](https://github.com/marketplace/actions/build-monogame-project). | ||
|
||
# Usage | ||
|
||
```yml | ||
name: Generate signed aab for release | ||
|
||
on: | ||
pull_request: | ||
branches: [master] | ||
|
||
# allow running this workflow manually | ||
workflow_dispatch: | ||
|
||
jobs: | ||
generate-signed-aab: | ||
runs-on: windows-latest | ||
|
||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v2 | ||
|
||
- name: Build Android project and sign generated aab | ||
uses: igotinfected-ci/build-and-sign-monogame-android@v1 | ||
with: | ||
solution-path: '${{ github.workspace }}\Project\Project.sln' | ||
content-mgcb-path: '${{ github.workspace }}\Project\Android\Content' | ||
content-mgcb-platform: "Android" | ||
project-path: '${{ github.workspace }}\Project\Android' | ||
csproj-path: '${{ github.workspace }}\Project\Android\Android.csproj' | ||
build-target: "PackageForAndroid" | ||
build-configuration: "Release" | ||
``` | ||
This action uploads the generated `aab`s as artifacts (`name: signed-aab`) to the workflow, meaning | ||
you can then use [download-artifact](https://github.com/marketplace/actions/download-a-build-artifact) | ||
to download them via a second job in the workflow. | ||
|
||
Retrieving the uploaded artifact: | ||
|
||
```yml | ||
name: Generate signed aab for release and do something with it | ||
on: | ||
pull_request: | ||
branches: [master] | ||
# allow running this workflow manually | ||
workflow_dispatch: | ||
jobs: | ||
generate-signed-aab: | ||
runs-on: windows-latest | ||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v2 | ||
- name: Build Android project and sign generated aab | ||
uses: igotinfected-ci/build-and-sign-monogame-android@v1 | ||
with: | ||
solution-path: '${{ github.workspace }}\Project\Project.sln' | ||
content-mgcb-path: '${{ github.workspace }}\Project\Android\Content' | ||
content-mgcb-platform: "Android" | ||
project-path: '${{ github.workspace }}\Project\Android' | ||
csproj-path: '${{ github.workspace }}\Project\Android\Android.csproj' | ||
build-target: "PackageForAndroid" | ||
build-configuration: "Release" | ||
do-something-with-it: | ||
runs-on: windows-latest | ||
steps: | ||
- name: Download artifact | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: signed-aab | ||
# artifact in current working directory now as a zip file containing | ||
# both the unsigned and signed aabs | ||
``` | ||
|
||
# License | ||
|
||
The scripts and documentation in this project are released under the [MIT License](LICENSE) |
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