Skip to content

Commit

Permalink
Use setOutput rather than return value in version extraction - releas…
Browse files Browse the repository at this point in the history
…e-package.yml
  • Loading branch information
stephenhand committed Jul 5, 2021
1 parent 0594216 commit a18d5a0
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions .github/workflows/release-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,18 +47,17 @@ jobs:
with:
script: |
const matches = /refs\/tags\/(.+)\/v(.+)/.exec(context.ref);
const packageInfo = { package: matches[1], version: matches[2] };
console.log(JSON.stringify(packageInfo));
return packageInfo;
core.setOutput('package', matches[1]);
core.setOutput('version', matches[2]);
- name: Nuget Pack
env:
VERSION: ${{ steps.extract-version.outputs.result.version }}
PACKAGE: ${{ steps.extract-version.outputs.result.package }}
VERSION: ${{ steps.extract-version.outputs.version }}
PACKAGE: ${{ steps.extract-version.outputs.package }}
run: dotnet pack ./${PACKAGE}/${PACKAGE}.csproj --configuration Release /p:Version=${VERSION} --no-build --output .

- name: Nuget Push
env:
VERSION: ${{ steps.extract-version.outputs.result.version }}
PACKAGE: ${{ steps.extract-version.outputs.result.package }}
VERSION: ${{ steps.extract-version.outputs.version }}
PACKAGE: ${{ steps.extract-version.outputs.package }}
run: dotnet nuget push ${PACKAGE}.${VERSION}.nupkg --source https://api.nuget.org/v3/index.json --api-key ${NUGET_API_KEY}

0 comments on commit a18d5a0

Please sign in to comment.