mirror of
https://github.com/Tyrrrz/CliFx.git
synced 2025-10-25 15:19:17 +00:00
Move to shared workflows
This commit is contained in:
43
.github/workflows/CD.yml
vendored
43
.github/workflows/CD.yml
vendored
@@ -1,43 +0,0 @@
|
|||||||
name: CD
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
tags:
|
|
||||||
- "*"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v2.3.3
|
|
||||||
|
|
||||||
- name: Get release version
|
|
||||||
id: get-version
|
|
||||||
uses: dawidd6/action-get-tag@v1
|
|
||||||
|
|
||||||
- name: Install .NET
|
|
||||||
uses: actions/setup-dotnet@v1.7.2
|
|
||||||
with:
|
|
||||||
dotnet-version: 6.0.x
|
|
||||||
|
|
||||||
- name: Pack
|
|
||||||
run: dotnet pack CliFx --configuration Release
|
|
||||||
|
|
||||||
- name: Deploy
|
|
||||||
run: dotnet nuget push CliFx/bin/Release/*.nupkg -s nuget.org -k ${{ secrets.NUGET_TOKEN }}
|
|
||||||
|
|
||||||
- name: Notify Discord
|
|
||||||
uses: satak/webrequest-action@v1.2.4
|
|
||||||
with:
|
|
||||||
url: ${{ secrets.DISCORD_WEBHOOK }}
|
|
||||||
method: POST
|
|
||||||
headers: |
|
|
||||||
{
|
|
||||||
"ContentType": "application/json; charset=UTF-8"
|
|
||||||
}
|
|
||||||
payload: |
|
|
||||||
{
|
|
||||||
"content": "**CliFx** new version released!\nVersion: `${{ steps.get-version.outputs.tag }}`\nChangelog: <https://github.com/Tyrrrz/CliFx/blob/${{ steps.get-version.outputs.tag }}/Changelog.md>"
|
|
||||||
}
|
|
||||||
28
.github/workflows/CI.yml
vendored
28
.github/workflows/CI.yml
vendored
@@ -1,28 +0,0 @@
|
|||||||
name: CI
|
|
||||||
|
|
||||||
on: [push, pull_request]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
os: [ubuntu-latest, windows-latest, macos-latest]
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v2.3.3
|
|
||||||
|
|
||||||
- name: Install .NET
|
|
||||||
uses: actions/setup-dotnet@v1.7.2
|
|
||||||
with:
|
|
||||||
dotnet-version: 6.0.x
|
|
||||||
|
|
||||||
- name: Build & test
|
|
||||||
run: dotnet test --configuration Release --logger GitHubActions
|
|
||||||
|
|
||||||
- name: Upload coverage
|
|
||||||
uses: codecov/codecov-action@v1.0.5
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.CODECOV_TOKEN }}
|
|
||||||
11
.github/workflows/main.yml
vendored
Normal file
11
.github/workflows/main.yml
vendored
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
name: main
|
||||||
|
|
||||||
|
on: [push, pull_request]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
main:
|
||||||
|
uses: tyrrrz/shared/.github/workflows/NuGet.yml@master
|
||||||
|
secrets:
|
||||||
|
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||||
|
NUGET_TOKEN: ${{ secrets.NUGET_TOKEN }}
|
||||||
|
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
|
||||||
Reference in New Issue
Block a user