Skip to content

Commit

Permalink
Merge pull request #17 from sonomirco/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
sonomirco authored Jul 27, 2021
2 parents 915974e + d5c21bf commit 24131bd
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
17 changes: 17 additions & 0 deletions .github/workflows/publish-on-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ name: Publish on Release
on:
release:
types: [published]

env:
PROJECT_PATH: 'Pipeline.csproj'
PACKAGE_OUTPUT_DIRECTORY: ${{ github.workspace }}\output

jobs:
increment-version:
Expand All @@ -18,3 +22,16 @@ jobs:
dotnet-version: 3.1.x
- name: Set env
run: echo "NUGET_VERSION=$(echo ${GITHUB_REF:10})" >> $GITHUB_ENV

- name: 🧱 Build project
run: dotnet build ${{ env.PROJECT_PATH }} --no-restore --configuration Release -p:PackageVersion=${{ steps.gitversion.outputs.semVer }} -p:Version=${{ steps.gitversion.outputs.semVer }}

# create symbols package https://docs.microsoft.com/en-us/nuget/create-packages/symbol-packages-snupkg
- name: 📦 Create the package
run: dotnet pack ${{ env.PROJECT_PATH }} --no-restore --no-build --configuration Release -p:PackageVersion=${{ steps.gitversion.outputs.semVer }} --output ${{ env.PACKAGE_OUTPUT_DIRECTORY }}

- name: 📑 Dotnet NuGet Add Source
run: dotnet nuget add source --username sonomirco --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/sonomirco/index.json"

- name: 🚀 Publish the package
run: dotnet nuget push ${{ env.PACKAGE_OUTPUT_DIRECTORY }}\*.nupkg --skip-duplicate --api-key ${{ secrets.GITHUB_TOKEN }} --source "github"
4 changes: 4 additions & 0 deletions .github/workflows/versioning.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: Versioning

on:
[push]

env:
PROJECT_PATH: 'Pipeline.csproj'
PACKAGE_OUTPUT_DIRECTORY: ${{ github.workspace }}\output

jobs:
# This workflow contains a single job called "build"
Expand Down
4 changes: 3 additions & 1 deletion Pipeline.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
<RepositoryType>git</RepositoryType>
<LangVersion>8</LangVersion>
<PackageVersion>0.1.2</PackageVersion>
<PackageId>Pipeliine</PackageId>
<Version>0.1.1</Version>
<PackageId>Pipeline</PackageId>
<PackageDescription>A repo for testing a release pipeline.</PackageDescription>
<RepositoryUrl>https://github.com/sonomirco/Pipeline</RepositoryUrl>
</PropertyGroup>

Expand Down

0 comments on commit 24131bd

Please sign in to comment.