Skip to content

Commit

Permalink
Fix release stuff.
Browse files Browse the repository at this point in the history
  • Loading branch information
wasabii committed Dec 9, 2024
1 parent 2d61da3 commit 7550128
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 8 deletions.
21 changes: 14 additions & 7 deletions .github/workflows/Alethic.SqlServer.Deployment.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
name: Alethic.SqlServer.Deployment

on:
workflow_dispatch:
push:
branches:
- main
- develop
pull_request:
branches:
- main
- develop
release:
types:
- created

jobs:
build:
Expand Down Expand Up @@ -193,25 +199,26 @@ jobs:
name: nuget
path: dist/nuget
- name: Create Release
if: github.ref == 'refs/heads/main' || github.event.head_commit.message == '+push'
uses: ncipollo/release-action@v1.14.0
if: github.ref_type == 'tag'
uses: ncipollo/release-action@v1
with:
tag: ${{ steps.GitVersion.outputs.semVer }}
allowUpdates: true
omitBodyDuringUpdate: true
artifacts: dist/nuget/*.nupkg,dist/nuget/*.snupkg
draft: false
generateReleaseNotes: true
prerelease: ${{ github.ref == 'refs/heads/develop' }}
makeLatest: true
token: ${{ secrets.GITHUB_TOKEN }}
- name: Push NuGet (GitHub)
if: github.event_name != 'pull_request'
shell: pwsh
run: dotnet nuget push dist/nuget/*.nupkg --source $env:GITHUB_REPOS --api-key $env:GITHUB_TOKEN --skip-duplicate
env:
GITHUB_REPOS: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Push NuGet
if: github.ref == 'refs/heads/main' || github.event.head_commit.message == '+push'
if: github.ref_type == 'tag'
shell: pwsh
run: dotnet nuget push dist/nuget/*.nupkg --source $env:NUGET_REPOS --api-key $env:NUGET_TOKEN --skip-duplicate
env:
NUGET_REPOS: https://api.nuget.org/v3/index.json
NUGET_TOKEN: ${{ secrets.NUGET_TOKEN }}
NUGET_TOKEN: ${{ secrets.NUGET_TOKEN }}
16 changes: 15 additions & 1 deletion GitVersion.yml
Original file line number Diff line number Diff line change
@@ -1 +1,15 @@
mode: Mainline
mode: ContinuousDeployment
assembly-file-versioning-format: '{Major}.{Minor}.{Patch}.{WeightedPreReleaseNumber ?? 0}'
major-version-bump-message: '\+semver:\s?(major)'
minor-version-bump-message: '\+semver:\s?(minor)'
patch-version-bump-message: '\+semver:\s?(patch)'
branches:
main:
regex: ^main$
tag: pre
increment: Patch
develop:
regex: ^develop$
tag: dev
increment: Minor

0 comments on commit 7550128

Please sign in to comment.