Skip to content

Commit

Permalink
Add CLI release pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikEJ committed Jan 10, 2024
1 parent 8edf8a9 commit 46e37f7
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 7 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/cli-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: CLI Tool

on:
workflow_dispatch:

env:
VERSION: ${{ github.run_number }}

jobs:
build:
runs-on: windows-2022

steps:
- uses: actions/checkout@v4

- name: Package CLI 6
run: dotnet pack src\GUI\efcpt.6\efcpt.6.csproj -p:PackageVersion=6.1.${{ env.VERSION }} -p:InformationalVersion=6.1.${{ env.VERSION }}

- name: Package CLI 7
run: dotnet pack src\GUI\efcpt.7\efcpt.7.csproj -p:PackageVersion=7.1.${{ env.VERSION }} -p:InformationalVersion=7.1.${{ env.VERSION }}

- name: Package CLI 8
run: dotnet pack src\GUI\efcpt.8\efcpt.8.csproj -p:PackageVersion=8.1.${{ env.VERSION }} -p:InformationalVersion=8.1.${{ env.VERSION }}

- name: Publish NuGet
if: startsWith(github.ref, 'refs/heads/master')
run: dotnet nuget push **\*.nupkg --source 'https://api.nuget.org/v3/index.json' --api-key ${{ secrets.NUGET }} --skip-duplicate

7 changes: 0 additions & 7 deletions .github/workflows/cli-tool.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,6 @@ jobs:
run: dotnet test src\GUI\NUnitTestCore\NUnitTestCore.csproj
continue-on-error: false

- name: Publish artifacts
uses: actions/upload-artifact@v4
with:
name: CLI Tool
path: |
**/*.nupkg
- name: Publish NuGet
if: startsWith(github.ref, 'refs/heads/master')
run: dotnet nuget push **\*.nupkg --source 'https://api.nuget.org/v3/index.json' --api-key ${{ secrets.NUGET }} --skip-duplicate
Expand Down

0 comments on commit 46e37f7

Please sign in to comment.