fix wrong version of Actions #2
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
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: windows-latest | |
permissions: | |
contents: write | |
if: startsWith(github.event.head_commit.message,'v') | |
defaults: | |
run: | |
shell: bash | |
env: | |
OWNER: ${{ github.repository_owner }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Generate GitHub App Token | |
id: app_token | |
uses: actions/create-github-app-token@v1 | |
with: | |
app-id: ${{ secrets.APP_ID }} | |
private-key: ${{ secrets.PRIVATE_KEY }} | |
owner: ${{ env.OWNER }} | |
- name: Checuout gd_cubism | |
uses: actions/checkout@v4 | |
with: | |
repository: ${{ env.OWNER }}/gd_cubism | |
token: ${{ steps.app_token.outputs.token }} | |
path: gd_cubism | |
persist-credentials : false | |
# setup actions | |
- run: rustup toolchain install stable --profile minimal | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
workspaces: 'winrt' | |
cache-on-failure: true | |
- uses: microsoft/setup-msbuild@v2 | |
- uses: chickensoft-games/setup-godot@v2 | |
name: 🤖 Setup Godot | |
with: | |
version: 4.2.1 | |
use-dotnet: true | |
include-templates: true | |
# build actions | |
- name: Build winrt addon | |
run: | | |
cargo build --manifest-path winrt/Cargo.toml | |
cargo build --manifest-path winrt/Cargo.toml --release | |
- name: move gd_cubism | |
run: mv gd_cubism/demo/addons/gd_cubism/bin/* ShittemDesk/addons/gd_cubism/bin/ | |
- name: 📦 Restore Dependencies | |
working-directory: ShittemDesk | |
run: dotnet restore | |
- name: 🧑🔬 Generate .NET Bindings | |
working-directory: ShittemDesk | |
run: godot --headless --build-solutions --quit || exit 0 | |
- name: 🦺 Build Projects | |
working-directory: ShittemDesk | |
run: dotnet build | |
- name: build godot game | |
working-directory: ShittemDesk | |
run: godot --export-release "Windows Desktop" ../Setup/program/ShittemDesk.exe || exit 0 | |
- name: Build Installer | |
working-directory: Setup | |
id: build_installer | |
continue-on-error: true | |
run: | | |
dotnet tool install --global wix | |
wix --version | |
wix extension add WixToolset.UI.wixext/4.0.5 WixToolset.Util.wixext/4.0.5 | |
wix build -platform x86 -out "../ShittemDesk_Setup.msi" -culture ja-JP -ext WixToolset.UI.wixext -ext WixToolset.Util.wixext "./Package.wxs" "./InstallDir_NoLicense.wxs" | |
- name: zip | |
run: 7z a "ShittemDesk.zip" "${{ github.workspace }}\Setup\program\*" | |
# release actions | |
- uses: softprops/action-gh-release@v2 | |
with: | |
name: ${{github.event.head_commit.message}} | |
tag_name: ${{github.event.head_commit.message}} | |
body: | | |
`ShittemDesk_Setup.msi` をダウンロードして実行することを推奨しています。 | |
generate_release_notes: true | |
files: | | |
ShittemDesk.zip | |
ShittemDesk_Setup.msi |