From 4e7ed830f8d15189401b39a7edecda6cf495ef6b Mon Sep 17 00:00:00 2001 From: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com> Date: Fri, 10 Dec 2021 23:21:38 +0200 Subject: [PATCH] Move to shared workflows --- .github/workflows/CD.yml | 43 -------------------------------------- .github/workflows/CI.yml | 28 ------------------------- .github/workflows/main.yml | 11 ++++++++++ 3 files changed, 11 insertions(+), 71 deletions(-) delete mode 100644 .github/workflows/CD.yml delete mode 100644 .github/workflows/CI.yml create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml deleted file mode 100644 index 02feb70..0000000 --- a/.github/workflows/CD.yml +++ /dev/null @@ -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: " - } diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml deleted file mode 100644 index 9ce317d..0000000 --- a/.github/workflows/CI.yml +++ /dev/null @@ -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 }} diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..32f7739 --- /dev/null +++ b/.github/workflows/main.yml @@ -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 }} \ No newline at end of file