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

Commit 1de3004

Browse files
committed
Merge branch 'main' into chore/run_codegen
2 parents beaae07 + 5cc39d6 commit 1de3004

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

.github/workflows/release-cli.yml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,22 @@ 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 || 'v0.1.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 | sed s/^v//)
20+
echo "::set-output name=version::$PACKAGE_VERSION"
1721
- name: Checkout
1822
uses: actions/checkout@v2
23+
with:
24+
submodules: true
1925
- name: Setup .NET Core SDK 6
2026
uses: actions/setup-dotnet@v1
2127
with:
2228
dotnet-version: 6.x
23-
- name: Set version
24-
run: PACKAGE_VERSION=$(echo -e ${{github.ref_name}} | tr -d 'v')
2529
- name: Add NuGet kiota source
2630
# NOTE: Password encryption is not supported for the linux platform (Encryption is only supported on Windows platforms.)
2731
run: |
@@ -37,6 +41,10 @@ jobs:
3741
run: dotnet publish --runtime ${{matrix.rid}} --self-contained true --configuration Release --output ${{env.OUTPUT_DIR}}
3842
- name: Package
3943
run: |
40-
zip format('${{env.PACKAGE_TEMPLATE}}.zip', '${{matrix.rid}}', $PACKAGE_VERSION) ${{env.OUTPUT_DIR}}/*
44+
cd ${{env.OUTPUT_DIR}}
45+
zip ${{format(env.PACKAGE_ZIP_TEMPLATE, matrix.rid, steps.get-version.outputs.version)}} $(ls -a)
4146
- name: Add to release
42-
run: gh release upload ${{github.ref_name}} format('${{env.PACKAGE_TEMPLATE}}.zip', '${{matrix.rid}}', $PACKAGE_VERSION) --clobber
47+
run: |
48+
gh release upload ${{github.ref_name}} ${{env.OUTPUT_DIR}}/${{format(env.PACKAGE_ZIP_TEMPLATE, matrix.rid, steps.get-version.outputs.version)}} --clobber
49+
env:
50+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)