Skip to content

Commit 86a5c8c

Browse files
committed
fix getting umb version
(cherry picked from commit c9724cc) # Conflicts: # .github/workflows/umb-release-preview.yml
1 parent e15e0fa commit 86a5c8c

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
- name: Checkout repository
1111
uses: actions/checkout@v3
1212
- name: Set VERSION variable from tag
13-
run: echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV
13+
run: echo "VERSION=${GITHUB_REF/refs\/tags\/umb-v/}" >> $GITHUB_ENV
1414
- name: Output version name
1515
run: echo "${VERSION}"
1616
- name: Cancel job if version is empty
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Release Preview Umbraco Package
2+
on:
3+
push:
4+
tags:
5+
- "umb-v[0-9]+.[0-9]+.[0-9]+-[a-z]*[0-9][0-9][0-9]"
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout repository
11+
uses: actions/checkout@v3
12+
- name: Set VERSION variable from tag
13+
run: echo "VERSION=${GITHUB_REF/refs\/tags\/umb-v/}" >> $GITHUB_ENV
14+
- name: Output version name
15+
run: echo "${VERSION}"
16+
- name: Cancel job if version is empty
17+
if: ${{ env.VERSION == '' }}
18+
run: exit 1
19+
- name: Build Umbraco Package
20+
run: dotnet pack ./src/Umbraco.Community.ImageSharpRemoteImages/Umbraco.Community.ImageSharpRemoteImages.csproj /p:NuGetVersion=${VERSION} /p:Version=${VERSION} --output . --configuration Release
21+
- name: Pack
22+
run: dotnet pack ./src/Umbraco.Community.ImageSharpRemoteImages/Umbraco.Community.ImageSharpRemoteImages.csproj /p:NuGetVersion=${VERSION} /p:Version=${VERSION} --output . --configuration Release --no-build
23+
- name: Push to NuGet
24+
run: dotnet nuget push **\Umbraco.Community.ImageSharpRemoteImages.${VERSION}.nupkg --api-key ${{secrets.NUGET_API_KEY}} --source https://api.nuget.org/v3/index.json

0 commit comments

Comments
 (0)