Skip to content

Commit

Permalink
fix getting umb version
Browse files Browse the repository at this point in the history
(cherry picked from commit c9724cc)

# Conflicts:
#	.github/workflows/umb-release-preview.yml
  • Loading branch information
skttl committed Aug 28, 2024
1 parent e15e0fa commit 86a5c8c
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set VERSION variable from tag
run: echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV
run: echo "VERSION=${GITHUB_REF/refs\/tags\/umb-v/}" >> $GITHUB_ENV
- name: Output version name
run: echo "${VERSION}"
- name: Cancel job if version is empty
Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/umb-release-preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Release Preview Umbraco Package
on:
push:
tags:
- "umb-v[0-9]+.[0-9]+.[0-9]+-[a-z]*[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\/umb-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 Umbraco Package
run: dotnet pack ./src/Umbraco.Community.ImageSharpRemoteImages/Umbraco.Community.ImageSharpRemoteImages.csproj /p:NuGetVersion=${VERSION} /p:Version=${VERSION} --output . --configuration Release
- name: Pack
run: dotnet pack ./src/Umbraco.Community.ImageSharpRemoteImages/Umbraco.Community.ImageSharpRemoteImages.csproj /p:NuGetVersion=${VERSION} /p:Version=${VERSION} --output . --configuration Release --no-build
- name: Push to NuGet
run: dotnet nuget push **\Umbraco.Community.ImageSharpRemoteImages.${VERSION}.nupkg --api-key ${{secrets.NUGET_API_KEY}} --source https://api.nuget.org/v3/index.json

0 comments on commit 86a5c8c

Please sign in to comment.