Skip to content
This repository was archived by the owner on Aug 29, 2025. It is now read-only.

Commit c7c92c8

Browse files
committed
Fix format expression syntax
1 parent b62ada6 commit c7c92c8

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

.github/workflows/release-cli.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,14 @@ jobs:
1010
rid: ['win-x64', 'osx-x64', 'linux-x64']
1111
env:
1212
NUGET_URL: https://nuget.pkg.github.com/microsoft/index.json
13-
PACKAGE_VERSION: unversioned
14-
PACKAGE_TEMPLATE: msgraph-cli-{0}-{1}
13+
PACKAGE_VERSION: ${{github.ref_name || 'v1.0.0'}}
14+
PACKAGE_ZIP_TEMPLATE: "msgraph-cli-{0}-{1}.zip"
1515
OUTPUT_DIR: /tmp/publish
1616
steps:
17+
- id: get-version
18+
run: |
19+
PACKAGE_VERSION=$(echo $PACKAGE_VERSION | tr -d 'v')
20+
echo "::set-output name=version::$PACKAGE_VERSION"
1721
- name: Checkout
1822
uses: actions/checkout@v2
1923
with:
@@ -22,8 +26,6 @@ jobs:
2226
uses: actions/setup-dotnet@v1
2327
with:
2428
dotnet-version: 6.x
25-
- name: Set version
26-
run: PACKAGE_VERSION=$(echo -e ${{github.ref_name}} | tr -d 'v')
2729
- name: Add NuGet kiota source
2830
# NOTE: Password encryption is not supported for the linux platform (Encryption is only supported on Windows platforms.)
2931
run: |
@@ -39,6 +41,6 @@ jobs:
3941
run: dotnet publish --runtime ${{matrix.rid}} --self-contained true --configuration Release --output ${{env.OUTPUT_DIR}}
4042
- name: Package
4143
run: |
42-
zip format('${{env.PACKAGE_TEMPLATE}}.zip', '${{matrix.rid}}', $PACKAGE_VERSION) ${{env.OUTPUT_DIR}}/*
44+
zip ${{format(env.PACKAGE_FILE_TEMPLATE, matrix.rid, steps.get-version.outputs.version)}} ${{env.OUTPUT_DIR}}/*
4345
- name: Add to release
44-
run: gh release upload ${{github.ref_name}} format('${{env.PACKAGE_TEMPLATE}}.zip', '${{matrix.rid}}', $PACKAGE_VERSION) --clobber
46+
run: gh release upload ${{github.ref_name}} ${{format(env.PACKAGE_FILE_TEMPLATE, matrix.rid, steps.get-version.outputs.version) --clobber

0 commit comments

Comments
 (0)