mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2026-02-02 16:19:12 +00:00
49 lines
1.6 KiB
YAML
49 lines
1.6 KiB
YAML
name: CI
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: windows-latest
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2.3.3
|
|
|
|
- name: Install .NET
|
|
uses: actions/setup-dotnet@v1.7.2
|
|
with:
|
|
# Fixed version, workaround for https://github.com/dotnet/core/issues/7176
|
|
dotnet-version: 6.0.100
|
|
|
|
- name: Build & test
|
|
# 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
|
|
env:
|
|
DISCORD_TOKEN: ${{ secrets.DISCORD_TOKEN }}
|
|
DISCORD_TOKEN_BOT: true
|
|
|
|
- name: Upload coverage
|
|
uses: codecov/codecov-action@v1.0.5
|
|
with:
|
|
token: ${{ secrets.CODECOV_TOKEN }}
|
|
|
|
- name: Build & publish (CLI)
|
|
run: dotnet publish DiscordChatExporter.Cli/ -o DiscordChatExporter.Cli/bin/Publish/ --configuration Release
|
|
|
|
- name: Build & publish (GUI)
|
|
run: dotnet publish DiscordChatExporter.Gui/ -o DiscordChatExporter.Gui/bin/Publish/ --configuration Release
|
|
|
|
- name: Upload build artifacts (CLI)
|
|
uses: actions/upload-artifact@v1
|
|
with:
|
|
name: DiscordChatExporter.CLI
|
|
path: DiscordChatExporter.Cli/bin/Publish/
|
|
|
|
- name: Upload build artifact (GUI)
|
|
uses: actions/upload-artifact@v1
|
|
with:
|
|
name: DiscordChatExporter
|
|
path: DiscordChatExporter.Gui/bin/Publish/
|