-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpublish.sh
More file actions
executable file
·29 lines (25 loc) · 959 Bytes
/
publish.sh
File metadata and controls
executable file
·29 lines (25 loc) · 959 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/usr/bin/env bash
#
# Publish script for Gokstad — packs and pushes NuGet packages to GitHub Packages.
#
# Prerequisites:
# export GITHUB_TOKEN=<your PAT with write:packages scope>
# dotnet nuget add source "https://nuget.pkg.github.com/aaroncorberts/index.json" \
# --name github --username aaroncorberts --password "$GITHUB_TOKEN" --store-password-in-clear-text
#
# Usage: ./publish.sh [version] (version defaults to 1.0.0)
VERSION=${1:-1.0.0}
PROJECTS=(
"src/Configuration/Gokstad.Configuration.csproj"
"src/Data/Gokstad.Data.csproj"
"src/DirectoryServices/Gokstad.DirectoryServices.csproj"
"src/Security/Gokstad.Security.csproj"
"src/Tracing/Gokstad.Tracing.csproj"
"src/Web/Gokstad.Web.csproj"
)
for proj in "${PROJECTS[@]}"; do
dotnet pack "$proj" -c Release -p:Version="$VERSION" --no-build
done
for proj in "${PROJECTS[@]}"; do
dotnet nuget push "${proj%/*}"/**/*.nupkg --source github --api-key "$GITHUB_TOKEN"
done