Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better nuget package versioning #4

Merged
merged 1 commit into from
Mar 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ on:

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Setup .NET
Expand All @@ -24,7 +22,7 @@ jobs:
- name: Test
run: dotnet test --no-build --verbosity normal
- name: Pack
run: dotnet pack --configuration Release --version-suffix ci-${{ github.run_number }}
run: dotnet pack --configuration Release -p:PackageVersion=${{ github.run_number }}-ci
- name: Add Nuget source
run: dotnet nuget add source https://nuget.pkg.github.com/bridgefield/index.json -n github -u bridgefield -p ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text
- name: Push
Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
name: Release

on: [workflow_dispatch]
on:
push:
tags:
- '*'

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.x
- name: Pack
run: dotnet pack --configuration Release
run: |
arrTag=(${GITHUB_REF//\// })
VERSION="${arrTag[2]}"
dotnet pack -c Release -p:PackageVersion=$VERSION
- name: Push
run: dotnet nuget push **\*.nupkg -s nuget.org -k ${{ secrets.NUGET_ORG_API_KEY }}
1 change: 0 additions & 1 deletion MonadicBits/MonadicBits.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<PackageId>bridgefield.MonadicBits</PackageId>
<VersionPrefix>0.1.0-alpha</VersionPrefix>
<Authors>Andreas Pfohl</Authors>
<Company>bridgefield GmbH</Company>
<RepositoryUrl>https://github.com/bridgefield/bits</RepositoryUrl>
Expand Down