-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
21 additions
and
4 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* tsutomi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,12 @@ permissions: | |
on: | ||
release: | ||
types: [published] | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
type: string | ||
description: 'The version to release' | ||
required: true | ||
|
||
jobs: | ||
build: | ||
|
@@ -36,21 +42,31 @@ jobs: | |
dotnet-version: 8.0.x | ||
|
||
- name: Setup GitVersion | ||
if: github.event.inputs.version == null | ||
uses: gittools/actions/gitversion/[email protected] | ||
with: | ||
versionSpec: '5.x' | ||
|
||
- name: Determine Version | ||
if: github.event.inputs.version == null | ||
uses: gittools/actions/gitversion/[email protected] | ||
|
||
- name: Emit Version Environment Variables from Input | ||
if: github.event.inputs.version != null | ||
run: | | ||
echo "GitVersion_SemVer=${{ github.event.inputs.version }}" >> $GITHUB_ENV | ||
echo "GitVersion_AssemblySemVer=${{ github.event.inputs.version }}" >> $GITHUB_ENV | ||
echo "GitVersion_AssemblySemFileVer=${{ github.event.inputs.version }}.0" >> $GITHUB_ENV | ||
echo "GitVersion_NuGetVersionV2=${{ github.event.inputs.version }}" >> $GITHUB_ENV | ||
- name: Build | ||
run: dotnet build -c Release /p:Version="${{ env.GitVersion_SemVer }}" /p:AssemblyVersion="${{ env.GitVersion_AssemblySemVer }}" /p:FileVersion="${{ env.GitVersion_AssemblySemFileVer }}" | ||
|
||
- name: Pack the Nuget Packages | ||
run: dotnet pack -c Release --no-build --no-restore --include-symbols --include-source --output nupkgs /p:PackageVersion="${{ env.GitVersion_NuGetVersionV2 }}" | ||
|
||
# - name: Publish the Nuget Packages to the GitHub Package Registry | ||
# run: dotnet nuget push **/*.nupkg --skip-duplicate --api-key ${{ secrets.GITHUB_TOKEN }} --source "https://nuget.pkg.github.com/deveel/index.json" | ||
- name: Publish the Nuget Packages to the GitHub Package Registry | ||
run: dotnet nuget push **/*.nupkg --skip-duplicate --api-key ${{ secrets.GITHUB_TOKEN }} --source "https://nuget.pkg.github.com/deveel/index.json" | ||
|
||
# - name: Publish the Nuget Packages to the Nuget Gallery | ||
# run: dotnet nuget push **/*.nupkg --skip-duplicate --api-key ${{ secrets.NUGET_API_KEY }} --source "https://api.nuget.org/v3/index.json" | ||
- name: Publish the Nuget Packages to the Nuget Gallery | ||
run: dotnet nuget push **/*.nupkg --skip-duplicate --api-key ${{ secrets.NUGET_API_KEY }} --source "https://api.nuget.org/v3/index.json" |