Skip to content

Commit 287d6a8

Browse files
committed
libgit2sharp.yml: make release
1 parent 6695743 commit 287d6a8

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

.github/workflows/libgit2sharp.yml

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,31 @@ jobs:
2222
- name: Restore dependencies
2323
run: dotnet restore LibGit2Sharp.sln
2424
- name: Build
25-
run: dotnet build --no-restore LibGit2Sharp.sln
25+
run: dotnet build --no-restore LibGit2Sharp.sln
26+
- name: Pack
27+
run: |
28+
dotnet pack --include-symbols -c Release LibGit2Sharp.sln
29+
ls ./bin/Packages/Release/
30+
- name: Create Release
31+
id: create_release
32+
uses: actions/create-release@v1
33+
env:
34+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35+
with:
36+
tag_name: ${{ github.ref }}
37+
release_name: Release ${{ github.ref }}
38+
draft: true
39+
prerelease: true
40+
- name: Upload Release Asset
41+
id: upload-release-asset
42+
uses: actions/upload-release-asset@v1
43+
env:
44+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
45+
with:
46+
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.ref }}.nupkg
48+
asset_name: LibGit2Sharp.0.27.0-preview-${{ github.ref }}.nupkg
49+
asset_content_type: application/nupkg
2650

2751
test:
2852
runs-on: ubuntu-20.04

0 commit comments

Comments
 (0)