-
-
Notifications
You must be signed in to change notification settings - Fork 1
26 lines (26 loc) · 1.12 KB
/
release.yml
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
name: Release Package
on:
push:
branches:
- '**'
tags:
- "v[0-9]+.[0-9]+.[0-9]+(-.+)?"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set VERSION variable from tag
run: echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV
- name: Output version name
run: echo "${VERSION}"
- name: Cancel job if version is empty
if: ${{ env.VERSION == '' }}
run: exit 1
- name: Build ImageSharp Package
run: dotnet pack src\ImageSharp.Community.Providers.Remote\ImageSharp.Community.Providers.Remote.csproj /p:NuGetVersion=${VERSION} /p:Version=${VERSION} --output . --configuration Release
- name: Pack
run: dotnet pack src\ImageSharp.Community.Providers.Remote\ImageSharp.Community.Providers.Remote.csproj /p:NuGetVersion=${VERSION} /p:Version=${VERSION} --output . --configuration Release --no-build
- name: Push to NuGet
run: dotnet nuget push **\ImageSharp.Community.Providers.Remote.${VERSION}.csproj --api-key ${{secrets.NUGET_API_KEY}} --source https://api.nuget.org/v3/index.json