initial commit
This commit is contained in:
22
.github/workflows/pull_request_dev.yml
vendored
Normal file
22
.github/workflows/pull_request_dev.yml
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
name: Build NuGet package on dev branch pull request
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- "dev"
|
||||
paths:
|
||||
- "TimetableDesigner.Backend.Events.OutboxPattern**"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6.0.2
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v3
|
||||
with:
|
||||
dotnet-version: 10.0.x
|
||||
- name: Build
|
||||
run: dotnet build
|
||||
22
.github/workflows/pull_request_main.yml
vendored
Normal file
22
.github/workflows/pull_request_main.yml
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
name: Build NuGet package on main branch pull request
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- "main"
|
||||
paths:
|
||||
- "TimetableDesigner.Backend.Events.OutboxPattern**"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6.0.2
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v3
|
||||
with:
|
||||
dotnet-version: 10.0.x
|
||||
- name: Build
|
||||
run: dotnet build
|
||||
22
.github/workflows/push_dev.yml
vendored
Normal file
22
.github/workflows/push_dev.yml
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
name: Build NuGet package on dev branch push
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- "dev"
|
||||
paths:
|
||||
- "TimetableDesigner.Backend.Events.OutboxPattern**"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6.0.2
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v3
|
||||
with:
|
||||
dotnet-version: 10.0.x
|
||||
- name: Build
|
||||
run: dotnet build
|
||||
72
.github/workflows/push_main.yml
vendored
Normal file
72
.github/workflows/push_main.yml
vendored
Normal file
@@ -0,0 +1,72 @@
|
||||
name: Build NuGet package on main branch push
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- "main"
|
||||
paths:
|
||||
- "TimetableDesigner.Backend.Events.OutboxPattern**"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build and pack
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6.0.2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v3
|
||||
with:
|
||||
dotnet-version: 10.0.x
|
||||
- name: Build
|
||||
run: dotnet build
|
||||
- name: Setup GitVersion
|
||||
uses: gittools/actions/gitversion/setup@v4.2.0
|
||||
with:
|
||||
versionSpec: 6.4.x
|
||||
- name: Determine version
|
||||
uses: gittools/actions/gitversion/execute@v4.2.0
|
||||
id: gitversion
|
||||
with:
|
||||
configFilePath: ./.github/config/gitversion.yml
|
||||
- name: Create NuGet package
|
||||
run: dotnet pack -c Release -p:Version=${{steps.gitversion.outputs.SemVer}} -p:PackageVersion=${{steps.gitversion.outputs.SemVer}} --output ${{ github.workspace}}/nuget
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v6
|
||||
with:
|
||||
name: nuget
|
||||
path: ${{ github.workspace}}/nuget/*.nupkg
|
||||
outputs:
|
||||
version: ${{ steps.gitversion.outputs.SemVer }}
|
||||
publish:
|
||||
name: Publish
|
||||
permissions: write-all
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
steps:
|
||||
- name: Download artifact
|
||||
uses: actions/download-artifact@v6
|
||||
with:
|
||||
name: nuget
|
||||
path: ${{ github.workspace}}/nuget
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v3
|
||||
with:
|
||||
dotnet-version: 10.0.x
|
||||
- name: Add source
|
||||
run: dotnet nuget add source --username TimetableDesigner --password ${{secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/TimetableDesigner/index.json"
|
||||
- name: Publish
|
||||
run: dotnet nuget push ${{ github.workspace}}/nuget/*.nupkg --source "github" --api-key ${{ secrets.NUGET_REGISTRY_API_KEY }} --skip-duplicate
|
||||
- name: Create Release
|
||||
uses: actions/create-release@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: ${{needs.build.outputs.version}}
|
||||
release_name: ${{needs.build.outputs.version}}
|
||||
draft: false
|
||||
prerelease: false
|
||||
|
||||
|
||||
Reference in New Issue
Block a user