Skip to content

Commit

Permalink
build fix
Browse files Browse the repository at this point in the history
  • Loading branch information
BL-Drew committed Dec 16, 2024
1 parent df34518 commit 13c00ae
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
- 'releases/*'

jobs:
qodana:
build:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.version.outputs.version }}
Expand All @@ -28,9 +28,9 @@ jobs:
id: version
shell: bash
run: |
VERSION=$(sed -n 's/.*<[vV]ersion>\(.*\)<\/[vV]ersion>.*/\1/p' StoryblokSharp/StoryblokSharp.csproj || echo "1.0.1")
VERSION=$(sed -n 's/.*<[vV]ersion>\(.*\)<\/[vV]ersion>.*/\1/p' src/StoryblokSharp/StoryblokSharp.csproj || echo "0.0.1")
if [ -z "$VERSION" ]; then
VERSION="1.0.1"
VERSION="0.0.1"
fi
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "Version: $VERSION"
Expand Down Expand Up @@ -63,7 +63,7 @@ jobs:

release:
runs-on: ubuntu-latest
needs: qodana
needs: build
if: github.ref == 'refs/heads/main'
steps:
- name: Download nuget package artifact
Expand All @@ -77,3 +77,11 @@ jobs:

- name: Push package to GitHub packages
run: dotnet nuget push artifacts/*.nupkg --api-key ${{ secrets.NUGET_PACKAGE_TOKEN }} --source "github"

- name: Create Release
uses: ncipollo/release-action@v1
with:
tag: v${{ needs.build.outputs.version }}
name: Release v${{ needs.build.outputs.version }}
artifacts: "artifacts/*.nupkg"
token: ${{ secrets.NUGET_PACKAGE_TOKEN }}

0 comments on commit 13c00ae

Please sign in to comment.