Skip to content

Add the option to change language #121

Add the option to change language

Add the option to change language #121

Workflow file for this run

name: MacOS DMG
on:
release:
types:
- published
push:
jobs:
build:
name: Build DMG on MacOS
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.402
- name: Set version
if: ${{ github.event_name == 'release' }}
run: 'echo "${{ github.event.release.tag_name }}" > ./VERSION'
- name: Restore
run: dotnet restore -r osx-x64
- name: Build QuestPatcher
run: dotnet msbuild ./QuestPatcher/QuestPatcher.csproj -t:BundleApp -p:RuntimeIdentifier=osx-x64 -p:Configuration=Release -p:UseAppHost=true
- name: Make DMG root
run: mkdir -p ./macos-dmg/dmg-root/
- name: Create applications symlink
run: ln -sfn "/Applications" "macos-dmg/dmg-root/Applications"
- name: Add LICENSE to app contents
run: cp LICENSE macos-dmg/dmg-root/LICENSE.txt
- name: Add app to app contents
run: cp -r ./QuestPatcher/bin/Release/net6.0/osx-x64/publish/QuestPatcher.app ./macos-dmg/dmg-root/QuestPatcher.app
- name: Strip signature
run: codesign --remove-signature ./macos-dmg/dmg-root/QuestPatcher.app
- name: Detach existing DMGs
run: hdiutil info | grep /dev/disk | grep partition | cut -f 1 | xargs hdiutil detach
- name: Create DMG
run: hdiutil create -srcfolder macos-dmg/dmg-root /tmp/QuestPatcher.dmg -volname QuestPatcher
- name: Compress DMG
run: hdiutil convert /tmp/QuestPatcher.dmg -format UDZO -o macos-dmg/QuestPatcher.dmg
- name: Artifact Upload ${{ matrix.target.runtime }}
if: ${{ github.event_name != 'release' }}
uses: actions/upload-artifact@v2
with:
name: QuestPatcher.dmg
path: ./macos-dmg/QuestPatcher.dmg
- name: Upload Release Asset
id: upload-release-asset
if: ${{ github.event_name == 'release' }}
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./macos-dmg/QuestPatcher.dmg
asset_name: QuestPatcher-mac.dmg
asset_content_type: application/octet-stream