Skip to content

Commit

Permalink
Fix release pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
frankhaugen committed Nov 5, 2023
1 parent 0574272 commit 45ba747
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 44 deletions.
20 changes: 1 addition & 19 deletions .github/workflows/merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,22 +27,4 @@ jobs:
working-directory: src
- name: Push NuGets
run: dotnet nuget push ".artifacts/packages/*.nupkg" -k ${{ secrets.NugetKey }} -s https://api.nuget.org/v3/index.json --skip-duplicate
working-directory: src

#- name: Test
# run: dotnet test --configuration Release -v m /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
# working-directory: src
#- name: Codecoverage
# uses: codecov/[email protected]
# with:
# fail_ci_if_error: false
#- name: Sonarcloud
# uses: spoland/[email protected]
# with:
# project-key: frankhaugen_Frank.Libraries
# sonar-host-url: https://sonarcloud.io
# sonar-organization: frankhaugen
# opencover-reports-paths: "**/*.opencover.xml"
# env:
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
working-directory: src
47 changes: 22 additions & 25 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,29 @@ on:
release:
branches: master
type: published

jobs:
nugets:
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.0.x'

- name: Find Latest Tag
id: find
uses: oprypin/[email protected]
with:
repository: ${{ github.repository }}
releases-only: true

- name: Pack
working-directory: src
run: dotnet pack --configuration Release -p:Version=${{ steps.find.outputs.tag }} -v m

- uses: AButler/[email protected]
with:
files: "**/Frank.Libraries.*.${{ steps.find.outputs.tag }}.nupkg"
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Publish
working-directory: src
run: dotnet nuget push "**/Frank.Libraries.*.${{ steps.find.outputs.tag }}.nupkg" -k ${{ secrets.NugetKey }} -s https://api.nuget.org/v3/index.json --skip-duplicate

- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 7.0.x
- name: Set execution permissions for build.ps1
run: chmod +x build.ps1
working-directory: src
- name: Find Latest Tag
id: find
uses: oprypin/[email protected]
with:
repository: ${{ github.repository }}
releases-only: true
- name: Build
run: pwsh build.ps1 -configuration Release -version ${{ steps.find.outputs.tag }} -build $GITHUB_RUN_NUMBER
working-directory: src
- name: Push NuGets
run: dotnet nuget push ".artifacts/packages/*.nupkg" -k ${{ secrets.NugetKey }} -s https://api.nuget.org/v3/index.json --skip-duplicate
working-directory: src
10 changes: 10 additions & 0 deletions src/Frank.Libraries.sln
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,15 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Shared", "Shared", "{77EEA3
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestingInfrastructure", "Shared\TestingInfrastructure\TestingInfrastructure.csproj", "{5CCB0894-23EF-4F9B-95BB-60A2B8D612A5}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "GitHubActions", "GitHubActions", "{641036F4-FCB3-4B2E-90A2-D4F659EF25FE}"
ProjectSection(SolutionItems) = preProject
..\.github\workflows\codeql-analysis.yml = ..\.github\workflows\codeql-analysis.yml
..\.github\workflows\merge.yml = ..\.github\workflows\merge.yml
..\.github\workflows\prerelease.yml = ..\.github\workflows\prerelease.yml
..\.github\workflows\pullrequest.yml = ..\.github\workflows\pullrequest.yml
..\.github\workflows\release.yml = ..\.github\workflows\release.yml
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -1015,5 +1024,6 @@ Global
{0D9A4F23-4921-4B9C-B96D-985090AD05E3} = {BF4508F8-DE53-41A3-80D5-2C39B1015D78}
{C410B0FE-953A-4944-8E19-CE20711FE7DC} = {BF4508F8-DE53-41A3-80D5-2C39B1015D78}
{5CCB0894-23EF-4F9B-95BB-60A2B8D612A5} = {77EEA39D-1A91-43EE-A903-4ED47C07520C}
{641036F4-FCB3-4B2E-90A2-D4F659EF25FE} = {B59B3D8F-E264-43C5-AC5D-B2C9D016A6FA}
EndGlobalSection
EndGlobal

0 comments on commit 45ba747

Please sign in to comment.