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

Add GitHub workflow for NuGet publish #46

Merged
merged 6 commits into from
Dec 6, 2024
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
42 changes: 42 additions & 0 deletions .github/workflows/publish-nuget.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Publish NuGet Packages

on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+'
phkiener marked this conversation as resolved.
Show resolved Hide resolved
- '[0-9]+.[0-9]+.[0-9]+-*'

jobs:
build-and-publish:
name: Build and Publish NuGet
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 9.0
- name: Extract Version from Tag
run: echo "VERSION=${GITHUB_REF##*/}" >> $GITHUB_ENV
- name: Install Dependencies
run: dotnet restore
- name: Build Solution
run: |
dotnet build --configuration Release \
phkiener marked this conversation as resolved.
Show resolved Hide resolved
--no-restore \
-p:CI_BUILD=true \
-p:Version=${{env.VERSION}} \
-p:PackageVersion=${{env.VERSION}} \
- name: Pack NuGet Packages
run: |
dotnet pack --configuration Release \
--no-build \
-p:CI_BUILD=true \
-p:Version=${{env.VERSION}} \
-p:PackageVersion=${{env.VERSION}} \
--output ./artifacts
- name: Publish to NuGet
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
run: dotnet nuget push ./artifacts/*.nupkg --source https://api.nuget.org/v3/index.json --api-key $NUGET_API_KEY
38 changes: 37 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -327,4 +327,40 @@ ASALocalRun/
*.nvuser

# MFractors (Xamarin productivity tool) working folder
.mfractor/
.mfractor/# Created by https://www.toptal.com/developers/gitignore/api/macos
# Edit at https://www.toptal.com/developers/gitignore?templates=macos

### macOS ###
# General
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
lfcyja marked this conversation as resolved.
Show resolved Hide resolved
Icon

# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

### macOS Patch ###
# iCloud generated files
*.icloud

# End of https://www.toptal.com/developers/gitignore/api/macos

Expand Down
4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
MIT License

Copyright (c) 2018-2023 Digitec Galaxus AG
2018-2023 Galaxus.Functional contributors (see https://github.com/DigitecGalaxus/Galaxus.Functional/graphs/contributors)
Copyright (c) 2018-2024 Digitec Galaxus AG
2018-2024 Galaxus.Functional contributors (see https://github.com/DigitecGalaxus/Galaxus.Functional/graphs/contributors)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion Package.props
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<PackageId>$(AssemblyName)</PackageId>
<PackageVersion>0.0.0</PackageVersion> <!-- Will be passed to the build -->
<Authors>Digitec Galaxus AG</Authors>
<Copyright>2018-2023 Digitec Galaxus AG</Copyright>
<Copyright>2018-2024 Digitec Galaxus AG</Copyright>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/DigitecGalaxus/Galaxus.Functional</PackageProjectUrl>
<RepositoryUrl>https://github.com/DigitecGalaxus/Galaxus.Functional</RepositoryUrl>
Expand Down
Loading