mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2026-02-03 00:29:20 +00:00
Create MacOS app bundle via a project target (#1376)
This commit is contained in:
26
.github/workflows/main.yml
vendored
26
.github/workflows/main.yml
vendored
@@ -133,21 +133,12 @@ jobs:
|
||||
dotnet publish ${{ matrix.app }}
|
||||
-p:Version=${{ github.ref_type == 'tag' && github.ref_name || format('999.9.9-ci-{0}', github.sha) }}
|
||||
-p:CSharpier_Bypass=true
|
||||
-p:PublishMacOSBundle=${{ startsWith(matrix.rid, 'osx-') }}
|
||||
--output ${{ matrix.app }}/bin/publish/
|
||||
--configuration Release
|
||||
--runtime ${{ matrix.rid }}
|
||||
--self-contained
|
||||
|
||||
- name: Generate macOS .app bundle resources
|
||||
if: ${{ startsWith(matrix.rid, 'osx-') && matrix.app == 'DiscordChatExporter.Gui' }}
|
||||
shell: pwsh
|
||||
run: >
|
||||
./bundle-macos-app.ps1
|
||||
-BundleName "${{ matrix.asset }}"
|
||||
-PublishDir "${{ matrix.app }}/bin/publish/"
|
||||
-Version "${{ github.ref_type == 'tag' && github.ref_name || '999.9.9'}}"
|
||||
-GitHubSha "${{ github.sha }}"
|
||||
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||
with:
|
||||
@@ -220,12 +211,15 @@ jobs:
|
||||
path: ${{ matrix.app }}/
|
||||
|
||||
- name: Set permissions
|
||||
if: ${{ !startsWith(matrix.rid, 'win-') && !(startsWith(matrix.rid, 'osx-') && matrix.app == 'DiscordChatExporter.Gui') }}
|
||||
run: chmod +x ${{ matrix.app }}/${{ matrix.asset }}
|
||||
|
||||
- name: Set permissions for macOS .app bundle
|
||||
if: ${{ startsWith(matrix.rid, 'osx-') && matrix.app == 'DiscordChatExporter.Gui' }}
|
||||
run: chmod +x ${{ matrix.app }}/${{ matrix.asset }}.app/Contents/MacOS/${{ matrix.asset }}
|
||||
if: ${{ !startsWith(matrix.rid, 'win-') }}
|
||||
run: |
|
||||
if [ -f ${{ matrix.app }}/${{ matrix.asset }} ]; then
|
||||
chmod +x ${{ matrix.app }}/${{ matrix.asset }}
|
||||
fi
|
||||
|
||||
if [ -f ${{ matrix.app }}/${{ matrix.asset }}.app/Contents/MacOS/${{ matrix.asset }} ]; then
|
||||
chmod +x ${{ matrix.app }}/${{ matrix.asset }}.app/Contents/MacOS/${{ matrix.asset }}
|
||||
fi
|
||||
|
||||
- name: Create package
|
||||
# Change into the artifacts directory to avoid including the directory itself in the zip archive
|
||||
|
||||
Reference in New Issue
Block a user