Skip to content

Commit eeb8873

Browse files
authored
Update libgit2sharp.yml
short_sha
1 parent f935193 commit eeb8873

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

.github/workflows/libgit2sharp.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ jobs:
2525
run: dotnet build --no-restore LibGit2Sharp.sln
2626
- name: Pack
2727
run: |
28+
echo running on branch ${GITHUB_REF##*/}
2829
dotnet pack --include-symbols -c Release LibGit2Sharp.sln
2930
ls ./bin/Packages/Release/
3031
- name: Create Release
@@ -40,12 +41,13 @@ jobs:
4041
- name: Upload Release Asset
4142
id: upload-release-asset
4243
uses: actions/upload-release-asset@v1
43-
env:
44+
env: |
45+
SHORT_SHA: ${GITHUB_REF##*/}
4446
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4547
with:
4648
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
47-
asset_path: ./bin/Packages/Release/LibGit2Sharp.0.27.0-preview-${{ github.sha }}.nupkg
48-
asset_name: LibGit2Sharp.0.27.0-preview-${{ github.sha }}.nupkg
49+
asset_path: ./bin/Packages/Release/LibGit2Sharp.0.27.0-preview-g${{ SHORT_SHA }}.nupkg
50+
asset_name: LibGit2Sharp.0.27.0-preview-g${{ SHORT_SHA }}.nupkg
4951
asset_content_type: application/nupkg
5052

5153
test:

0 commit comments

Comments
 (0)