Files
ReleaseUpdater/.gitea/workflows/release-package.yaml
FrigaT 1425ce2231
Some checks failed
CI / build-test (push) Failing after 26s
Release / pack-and-publish (release) Successful in 27s
ci
2025-11-25 08:01:04 +03:00

46 lines
1.3 KiB
YAML

name: Release
on:
release:
types: [published]
jobs:
pack-and-publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Restore ReleaseUpdater
run: dotnet restore ReleaseUpdater
- name: Set version from tag
id: version
run: |
TAG="${GITHUB_REF_NAME#v}"
echo "PACKAGE_VERSION=$TAG" >> $GITHUB_OUTPUT
- name: Build ReleaseUpdater
run: dotnet build ReleaseUpdater -c Release -p:Version=${{ steps.version.outputs.PACKAGE_VERSION }}
- name: Pack ReleaseUpdater
run: dotnet pack ReleaseUpdater -c Release --no-build -p:PackageVersion=${{ steps.version.outputs.PACKAGE_VERSION }} -o ./artifacts
- name: Upload package artifact
uses: actions/upload-artifact@v3
with:
name: nuget-packages
path: artifacts/*.nupkg
- name: Publish to NuGet
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
run: dotnet nuget push ./artifacts/*.nupkg --source https://git.frigat.duckdns.org/api/packages/FrigaT/nuget/index.json --api-key $NUGET_API_KEY --skip-duplicate