Update build infra

This commit is contained in:
Tyrrrz 2020-11-10 23:58:05 +02:00
parent 547bf0a463
commit 5e04accdff
2 changed files with 67 additions and 67 deletions

View file

@ -3,64 +3,64 @@ name: CD
on: on:
push: push:
tags: tags:
- '*' - "*"
jobs: jobs:
build: build:
runs-on: windows-latest runs-on: windows-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v2.3.3 uses: actions/checkout@v2.3.3
- name: Install .NET Core - name: Install .NET
uses: actions/setup-dotnet@v1.7.2 uses: actions/setup-dotnet@v1.7.2
with: with:
dotnet-version: 3.1.100 dotnet-version: 5.0.100
- name: Build & publish (CLI) - name: Build & publish (CLI)
run: dotnet publish DiscordChatExporter.Cli/ -o DiscordChatExporter.Cli/bin/Publish/ --configuration Release run: dotnet publish DiscordChatExporter.Cli/ -o DiscordChatExporter.Cli/bin/Publish/ --configuration Release
- name: Build & publish (GUI) - name: Build & publish (GUI)
run: dotnet publish DiscordChatExporter.Gui/ -o DiscordChatExporter.Gui/bin/Publish/ --configuration Release run: dotnet publish DiscordChatExporter.Gui/ -o DiscordChatExporter.Gui/bin/Publish/ --configuration Release
- name: Pack (CLI) - name: Pack (CLI)
run: Compress-Archive -Path DiscordChatExporter.Cli/bin/Publish/* -DestinationPath DiscordChatExporter.Cli/bin/Publish/Archive.zip -Force run: Compress-Archive -Path DiscordChatExporter.Cli/bin/Publish/* -DestinationPath DiscordChatExporter.Cli/bin/Publish/Archive.zip -Force
shell: pwsh shell: pwsh
- name: Pack (GUI) - name: Pack (GUI)
run: Compress-Archive -Path DiscordChatExporter.Gui/bin/Publish/* -DestinationPath DiscordChatExporter.Gui/bin/Publish/Archive.zip -Force run: Compress-Archive -Path DiscordChatExporter.Gui/bin/Publish/* -DestinationPath DiscordChatExporter.Gui/bin/Publish/Archive.zip -Force
shell: pwsh shell: pwsh
- name: Create release - name: Create release
id: create_release id: create_release
uses: actions/create-release@v1.0.1 uses: actions/create-release@v1.0.1
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with: with:
tag_name: ${{ github.ref }} tag_name: ${{ github.ref }}
release_name: ${{ github.ref }} release_name: ${{ github.ref }}
body: | body: |
[Changelog](https://github.com/Tyrrrz/DiscordChatExporter/blob/master/Changelog.md) [Changelog](https://github.com/Tyrrrz/DiscordChatExporter/blob/master/Changelog.md)
draft: false draft: false
prerelease: false prerelease: false
- name: Upload release asset (CLI) - name: Upload release asset (CLI)
uses: actions/upload-release-asset@v1.0.2 uses: actions/upload-release-asset@v1.0.2
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with: with:
upload_url: ${{ steps.create_release.outputs.upload_url }} upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: DiscordChatExporter.Cli/bin/Publish/Archive.zip asset_path: DiscordChatExporter.Cli/bin/Publish/Archive.zip
asset_name: DiscordChatExporter.CLI.zip asset_name: DiscordChatExporter.CLI.zip
asset_content_type: application/zip asset_content_type: application/zip
- name: Upload release asset (GUI) - name: Upload release asset (GUI)
uses: actions/upload-release-asset@v1.0.2 uses: actions/upload-release-asset@v1.0.2
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with: with:
upload_url: ${{ steps.create_release.outputs.upload_url }} upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: DiscordChatExporter.Gui/bin/Publish/Archive.zip asset_path: DiscordChatExporter.Gui/bin/Publish/Archive.zip
asset_name: DiscordChatExporter.zip asset_name: DiscordChatExporter.zip
asset_content_type: application/zip asset_content_type: application/zip

View file

@ -7,28 +7,28 @@ jobs:
runs-on: windows-latest runs-on: windows-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v2.3.3 uses: actions/checkout@v2.3.3
- name: Install .NET Core - name: Install .NET
uses: actions/setup-dotnet@v1.7.2 uses: actions/setup-dotnet@v1.7.2
with: with:
dotnet-version: 3.1.100 dotnet-version: 5.0.100
- name: Build & publish (CLI) - name: Build & publish (CLI)
run: dotnet publish DiscordChatExporter.Cli/ -o DiscordChatExporter.Cli/bin/Publish/ --configuration Release run: dotnet publish DiscordChatExporter.Cli/ -o DiscordChatExporter.Cli/bin/Publish/ --configuration Release
- name: Build & publish (GUI) - name: Build & publish (GUI)
run: dotnet publish DiscordChatExporter.Gui/ -o DiscordChatExporter.Gui/bin/Publish/ --configuration Release run: dotnet publish DiscordChatExporter.Gui/ -o DiscordChatExporter.Gui/bin/Publish/ --configuration Release
- name: Upload build artifacts (CLI) - name: Upload build artifacts (CLI)
uses: actions/upload-artifact@v1 uses: actions/upload-artifact@v1
with: with:
name: DiscordChatExporter.CLI name: DiscordChatExporter.CLI
path: DiscordChatExporter.Cli/bin/Publish/ path: DiscordChatExporter.Cli/bin/Publish/
- name: Upload build artifact (GUI) - name: Upload build artifact (GUI)
uses: actions/upload-artifact@v1 uses: actions/upload-artifact@v1
with: with:
name: DiscordChatExporter name: DiscordChatExporter
path: DiscordChatExporter.Gui/bin/Publish/ path: DiscordChatExporter.Gui/bin/Publish/