Skip to content

docs: Add new "arrows" favicon #61

docs: Add new "arrows" favicon

docs: Add new "arrows" favicon #61

Workflow file for this run

name: TEST - Deploy NuGet package
on:
pull_request:
branches: ["main"]
# workflow_dispatch:
# inputs:
# environment:
# description: Deployment environment
# type: choice
# options:
# - staging
# - nuget.org
# default: staging
# required: true
# preview:
# description: Append preview suffix
# type: boolean
# default: true
# required: true
#
# concurrency:
# group: ${{ inputs.environment }}
# cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.compose.outputs.version }}
steps:
- name: Checkout source
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: "8.x"
dotnet-quality: "ga"
- name: Setup GitVersion
uses: gittools/actions/gitversion/[email protected]
with:
versionSpec: "5.x"
preferLatestVersion: true
- name: Determine version
id: gitversion
uses: gittools/actions/gitversion/[email protected]
with:
updateAssemblyInfo: true
useConfigFile: true
configFilePath: gitversion.yml
- name: Compose version
id: compose
run: |
composed_version=${{ steps.gitversion.outputs.majorMinorPatch }}${{ '-TESTONLY' }}
echo "version=$composed_version" >> "$GITHUB_OUTPUT"
echo "COMPOSED_VERSION=$composed_version" >> "$GITHUB_ENV"
- name: Generate release notes
id: notes
run: |
release_notes=$(git log $(git describe --tags $(git rev-list --tags --max-count=1))..HEAD --pretty=format:"- %s" | grep -vE '(docs:|chore:|ci:|Merge)')
release_notes=$(echo "$release_notes" | sed -e 's/&/\&amp;/g' -e 's/</\&lt;/g' -e 's/>/\&gt;/g' -e 's/\"/\&quot;/g' -e "s/'/\&apos;/g")
echo "## Release notes" > release_notes.md
echo "" >> release_notes.md
echo "$release_notes" >> release_notes.md
echo "" >> release_notes.md
echo "[more info](https://github.com/DaveSkender/Stock.Indicators/releases/tag/${{ steps.compose.outputs.version }}) →" >> release_notes.md
echo "release_notes<<EOF" >> $GITHUB_OUTPUT
cat release_notes.md >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
- name: Add release notes to project
uses: jacobtomlinson/gha-find-replace@v3
with:
find: <PackageReleaseNotes></PackageReleaseNotes>
replace: >
<PackageReleaseNotes>
${{ steps.notes.outputs.release_notes }}
</PackageReleaseNotes>
include: "src/*.csproj"
regex: false
- name: Build library
run: >
dotnet build src/Indicators.csproj
--configuration Release
--property:Version=${{ steps.compose.outputs.version }}
--property:ContinuousIntegrationBuild=true
-warnAsError
- name: Pack for NuGet
run: >
dotnet pack src/Indicators.csproj
--configuration Release
--no-build
--include-symbols
--output NuGet
-p:PackageVersion=${{ steps.compose.outputs.version }}
- name: Save package
uses: actions/upload-artifact@v4
with:
name: packages
path: NuGet
- name: Save project
uses: actions/upload-artifact@v4
if: always()
with:
name: project
path: src/Indicators.csproj
- name: Summary output
run: |
{
echo "| Version No. | Component |"
echo "| :---------- | :---------------------------------------------- |"
echo "| Major | ${{ steps.gitversion.outputs.major }} |"
echo "| Minor | ${{ steps.gitversion.outputs.minor }} |"
echo "| Patch | ${{ steps.gitversion.outputs.patch }} |"
echo "| Base | ${{ steps.gitversion.outputs.majorMinorPatch }} |"
echo "| Composed | ${{ steps.compose.outputs.composed_version }} |"
echo "${{ steps.notes.outputs.release_notes }}"
} >> $GITHUB_STEP_SUMMARY