Merge pull request #3047 from planetarium/release/1.19.4 #697
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
name: publish | |
on: | |
push: | |
branches: | |
- development | |
- main | |
tags: | |
- "*.*.*" | |
jobs: | |
nuget: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 6.0.400 | |
- name: build | |
run: | | |
dotnet_args="-c Release -p:NoPackageAnalysis=true" | |
if [[ ! "$GITHUB_REF" =~ ^refs/tags/* ]]; then | |
project_suffix=dev.${{ github.sha }} | |
dotnet_args="$dotnet_args --version-suffix $project_suffix" | |
fi | |
# shellcheck disable=SC2086 | |
dotnet build $dotnet_args | |
# shellcheck disable=SC2086 | |
dotnet pack $dotnet_args | |
- name: push | |
if: github.event_name != 'pull_request' | |
run: | | |
if [[ "$NUGET_API_KEY" != "" ]]; then | |
for project in Lib9c Lib9c.Abstractions Lib9c.MessagePack Lib9c.Renderers | |
do | |
dotnet nuget push ./$project/.bin/Lib9c.*.nupkg \ | |
--api-key "$NUGET_API_KEY" \ | |
--skip-duplicate \ | |
--source https://api.nuget.org/v3/index.json | |
done | |
fi | |
env: | |
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }} | |
jsr: | |
uses: planetarium/.github/.github/workflows/publish_jsr.yaml@bfb34283b538003768d19bff9ea05bcbd709d643 | |
with: | |
workspace_directory: "@planetarium" | |
working_directory: "@planetarium/lib9c" | |
pnpm_version: "9" |