mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2026-02-01 15:49:11 +00:00
Prettify workflow files
This commit is contained in:
8
.github/workflows/docker.yml
vendored
8
.github/workflows/docker.yml
vendored
@@ -15,7 +15,9 @@ jobs:
|
||||
uses: docker/setup-buildx-action@v2
|
||||
|
||||
- name: Login to DockerHub
|
||||
run: docker login -u tyrrrz -p ${{ secrets.DOCKER_TOKEN }}
|
||||
run: >
|
||||
echo ${{ secrets.DOCKER_TOKEN }} |
|
||||
docker login -u tyrrrz --password-stdin
|
||||
|
||||
- name: Build & push image
|
||||
run: >
|
||||
@@ -42,7 +44,9 @@ jobs:
|
||||
uses: docker/setup-buildx-action@v2
|
||||
|
||||
- name: Login to DockerHub
|
||||
run: docker login -u tyrrrz -p ${{ secrets.DOCKER_TOKEN }}
|
||||
run: >
|
||||
echo ${{ secrets.DOCKER_TOKEN }} |
|
||||
docker login -u tyrrrz --password-stdin
|
||||
|
||||
- name: Build & push image
|
||||
run: >
|
||||
|
||||
32
.github/workflows/main.yml
vendored
32
.github/workflows/main.yml
vendored
@@ -23,7 +23,13 @@ jobs:
|
||||
- name: Run tests
|
||||
# Tests need access to secrets, so we can't run them against PRs because of limited trust
|
||||
if: ${{ github.event_name != 'pull_request' }}
|
||||
run: dotnet test --configuration Release --logger GitHubActions --collect:"XPlat Code Coverage" -- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=opencover
|
||||
run: >
|
||||
dotnet test
|
||||
--configuration Release
|
||||
--logger "GitHubActions;summary.includePassedTests=true;summary.includeSkippedTests=true"
|
||||
--collect:"XPlat Code Coverage"
|
||||
--
|
||||
DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=opencover
|
||||
env:
|
||||
DISCORD_TOKEN: ${{ secrets.DISCORD_TOKEN }}
|
||||
|
||||
@@ -51,10 +57,16 @@ jobs:
|
||||
dotnet-version: 7.0.x
|
||||
|
||||
- name: Publish (CLI)
|
||||
run: dotnet publish DiscordChatExporter.Cli/ -o DiscordChatExporter.Cli/bin/Publish/ --configuration Release
|
||||
run: >
|
||||
dotnet publish DiscordChatExporter.Cli
|
||||
--output DiscordChatExporter.Cli/bin/Publish/
|
||||
--configuration Release
|
||||
|
||||
- name: Publish (GUI)
|
||||
run: dotnet publish DiscordChatExporter.Gui/ -o DiscordChatExporter.Gui/bin/Publish/ --configuration Release
|
||||
run: >
|
||||
dotnet publish DiscordChatExporter.Gui
|
||||
--output DiscordChatExporter.Gui/bin/Publish/
|
||||
--configuration Release
|
||||
|
||||
- name: Upload artifacts (CLI)
|
||||
uses: actions/upload-artifact@v3
|
||||
@@ -87,12 +99,20 @@ jobs:
|
||||
path: DiscordChatExporter.Gui
|
||||
|
||||
- name: Create package (CLI)
|
||||
run: Compress-Archive -Path DiscordChatExporter.Cli/* -DestinationPath DiscordChatExporter.Cli.zip -Force
|
||||
shell: pwsh
|
||||
run: >
|
||||
Compress-Archive
|
||||
-Path DiscordChatExporter.Cli/*
|
||||
-DestinationPath DiscordChatExporter.Cli.zip
|
||||
-Force
|
||||
|
||||
- name: Create package (GUI)
|
||||
run: Compress-Archive -Path DiscordChatExporter.Gui/* -DestinationPath DiscordChatExporter.zip -Force
|
||||
shell: pwsh
|
||||
run: >
|
||||
Compress-Archive
|
||||
-Path DiscordChatExporter.Gui/*
|
||||
-DestinationPath DiscordChatExporter.zip
|
||||
-Force
|
||||
|
||||
- name: Create release
|
||||
uses: softprops/action-gh-release@v1
|
||||
@@ -124,4 +144,4 @@ jobs:
|
||||
body: |
|
||||
{
|
||||
"content": "**DiscordChatExporter** new version released!\nVersion: `${{ steps.get-version.outputs.tag }}`\nChangelog: <https://github.com/Tyrrrz/DiscordChatExporter/blob/${{ steps.get-version.outputs.tag }}/Changelog.md>"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user