Skip to content

Commit

Permalink
Simplified CI
Browse files Browse the repository at this point in the history
  • Loading branch information
bastianeicher committed Apr 10, 2023
1 parent 6c1a2c7 commit be7ceaf
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ jobs:

# Build
- name: Build (pre-release)
if: steps.gitversion.outputs.preReleaseLabel != ''
if: github.ref_type != 'tag'
run: .\build.ps1 ${{steps.gitversion.outputs.nuGetVersion}}-${{steps.gitversion.outputs.shortSha}}
- name: Build (release)
if: steps.gitversion.outputs.preReleaseLabel == ''
if: github.ref_type == 'tag'
run: .\build.ps1 ${{steps.gitversion.outputs.nuGetVersion}}
- name: Report test results
if: always()
Expand All @@ -39,24 +39,21 @@ jobs:

# Release
- name: Create GitHub Release
if: steps.gitversion.outputs.preReleaseLabel == ''
if: github.ref_type == 'tag'
uses: softprops/action-gh-release@v1

# Publish
- name: Publish documentation
if: steps.gitversion.outputs.preReleaseLabel == ''
if: github.ref_type == 'tag'
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{github.token}}
force_orphan: true
publish_dir: artifacts/Documentation
cname: sat-solver.nano-byte.net
- name: Publish packages (GitHub)
if: github.event_name == 'push' && !startsWith(github.ref, 'refs/heads/renovate/')
run: |
Get-ChildItem artifacts\Release\*.nupkg | ForEach-Object {
curl.exe -sS -X PUT -u "${{github.actor}}:${{github.token}}" -F package=@$_ https://nuget.pkg.github.com/${{github.repository_owner}}/
}
if: github.event_name == 'push' && !startsWith(github.ref_name, 'renovate/')
run: dotnet nuget push artifacts\Release\*.nupkg --source https://nuget.pkg.github.com/${{github.repository_owner}}/index.json --api-key ${{github.token}} --no-symbols --skip-duplicate
- name: Publish packages (NuGet.org)
if: steps.gitversion.outputs.preReleaseLabel == ''
if: github.ref_type == 'tag'
run: dotnet nuget push artifacts\Release\*.nupkg --source nuget.org --api-key ${{secrets.NUGET_API_KEY}}

0 comments on commit be7ceaf

Please sign in to comment.