mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2026-01-28 22:01:55 +00:00
Make the GUI x-platform and adapt the CI/CD pipeline to accommodate that (#1222)
This commit is contained in:
3
.github/workflows/docker.yml
vendored
3
.github/workflows/docker.yml
vendored
@@ -12,8 +12,7 @@ on:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
# Outputs from this job aren't really used, but it's here to verify that
|
||||
# the Dockerfile builds correctly on pull requests.
|
||||
# Outputs from this job aren't really used, but it's here to verify that the Dockerfile builds correctly
|
||||
pack:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
|
||||
49
.github/workflows/main.yml
vendored
49
.github/workflows/main.yml
vendored
@@ -18,7 +18,7 @@ env:
|
||||
|
||||
jobs:
|
||||
format:
|
||||
runs-on: windows-latest
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
|
||||
permissions:
|
||||
@@ -43,7 +43,7 @@ jobs:
|
||||
# Tests need access to secrets, so we can't run them against PRs because of limited trust
|
||||
if: ${{ github.event_name != 'pull_request' }}
|
||||
|
||||
runs-on: windows-latest
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
|
||||
permissions:
|
||||
@@ -82,7 +82,24 @@ jobs:
|
||||
app:
|
||||
- DiscordChatExporter.Cli
|
||||
- DiscordChatExporter.Gui
|
||||
rid:
|
||||
- win-arm64
|
||||
- win-x86
|
||||
- win-x64
|
||||
- linux-arm
|
||||
- linux-arm64
|
||||
- linux-musl-x64
|
||||
- linux-x64
|
||||
- osx-arm64
|
||||
- osx-x64
|
||||
include:
|
||||
- app: DiscordChatExporter.Cli
|
||||
asset: DiscordChatExporter.Cli
|
||||
- app: DiscordChatExporter.Gui
|
||||
# GUI assets aren't suffixed, unlike the CLI assets
|
||||
asset: DiscordChatExporter
|
||||
|
||||
# Need to run on Windows because of DotnetRuntimeBootstrapper's dependency on Ressy
|
||||
runs-on: windows-latest
|
||||
timeout-minutes: 10
|
||||
|
||||
@@ -106,12 +123,13 @@ jobs:
|
||||
-p:CSharpier_Bypass=true
|
||||
--output ${{ matrix.app }}/bin/publish/
|
||||
--configuration Release
|
||||
--use-current-runtime
|
||||
--runtime ${{ matrix.rid }}
|
||||
--no-self-contained
|
||||
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
|
||||
with:
|
||||
name: ${{ matrix.app }}
|
||||
name: ${{ matrix.asset }}.${{ matrix.rid }}
|
||||
path: ${{ matrix.app }}/bin/publish/
|
||||
if-no-files-found: error
|
||||
|
||||
@@ -148,11 +166,21 @@ jobs:
|
||||
app:
|
||||
- DiscordChatExporter.Cli
|
||||
- DiscordChatExporter.Gui
|
||||
rid:
|
||||
- win-arm64
|
||||
- win-x86
|
||||
- win-x64
|
||||
- linux-arm
|
||||
- linux-arm64
|
||||
- linux-musl-x64
|
||||
- linux-x64
|
||||
- osx-arm64
|
||||
- osx-x64
|
||||
include:
|
||||
- app: DiscordChatExporter.Cli
|
||||
asset: DiscordChatExporter.Cli
|
||||
- app: DiscordChatExporter.Gui
|
||||
# GUI asset isn't suffixed, unlike the CLI asset
|
||||
# GUI assets aren't suffixed, unlike the CLI assets
|
||||
asset: DiscordChatExporter
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
@@ -166,25 +194,20 @@ jobs:
|
||||
- name: Download artifacts
|
||||
uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1
|
||||
with:
|
||||
name: ${{ matrix.app }}
|
||||
name: ${{ matrix.asset }}.${{ matrix.rid }}
|
||||
path: ${{ matrix.app }}/
|
||||
|
||||
- name: Configure permissions
|
||||
# Remove this when the GUI also becomes cross-platform
|
||||
if: ${{ matrix.app == 'DiscordChatExporter.Cli' }}
|
||||
run: chmod +x ${{ matrix.app }}/${{ matrix.app }}.sh
|
||||
|
||||
- name: Create package
|
||||
# Change into the artifacts directory to avoid including the directory itself in the zip archive
|
||||
working-directory: ${{ matrix.app }}/
|
||||
run: zip -rX ../${{ matrix.asset }}.zip .
|
||||
run: zip -r ../${{ matrix.asset }}.${{ matrix.rid }}.zip .
|
||||
|
||||
- name: Upload release asset
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: >
|
||||
gh release upload ${{ github.ref_name }}
|
||||
${{ matrix.asset }}.zip
|
||||
${{ matrix.asset }}.${{ matrix.rid }}.zip
|
||||
--repo ${{ github.event.repository.full_name }}
|
||||
|
||||
notify:
|
||||
|
||||
Reference in New Issue
Block a user