Skip to content

Commit 7431db2

Browse files
committed
adding auto-create of release in github
1 parent f9527eb commit 7431db2

1 file changed

Lines changed: 64 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,70 @@ jobs:
3434
name: packages
3535
path: ${{ env.OUTPUT_PATH }}
3636

37+
publish-release:
38+
needs: build
39+
runs-on: ubuntu-latest
40+
41+
steps:
42+
- uses: actions/download-artifact@v2
43+
with:
44+
name: packages
45+
path: ${{ env.OUTPUT_PATH }}
46+
- name: Create Release
47+
id: create_release
48+
uses: actions/create-release@v1
49+
env:
50+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
51+
with:
52+
tag_name: ${{ github.ref }}
53+
release_name: Release ${{ github.ref }}
54+
draft: false
55+
prerelease: false
56+
body_path: changelog.md
57+
- name: Upload NuGet package
58+
id: upload-release-asset
59+
uses: actions/upload-release-asset@v1
60+
env:
61+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
62+
with:
63+
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
64+
asset_path: FSharp.CosmosDb.${{ github.ref }}.nupkg
65+
asset_name: FSharp.CosmosDb.${{ github.ref }}.nupkg
66+
asset_content_type: application/zip
67+
68+
- name: Upload NuGet package (analyzer)
69+
id: upload-release-asset
70+
uses: actions/upload-release-asset@v1
71+
env:
72+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
73+
with:
74+
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
75+
asset_path: FSharp.CosmosDb.Analyzer.${{ github.ref }}.nupkg
76+
asset_name: FSharp.CosmosDb.Analyzer.${{ github.ref }}.nupkg
77+
asset_content_type: application/zip
78+
79+
- name: Upload NuGet symbol package
80+
id: upload-release-asset
81+
uses: actions/upload-release-asset@v1
82+
env:
83+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
84+
with:
85+
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
86+
asset_path: FSharp.CosmosDb.${{ github.ref }}.snupkg
87+
asset_name: FSharp.CosmosDb.${{ github.ref }}.snupkg
88+
asset_content_type: application/zip
89+
90+
- name: Upload NuGet symbol package (analyzer)
91+
id: upload-release-asset
92+
uses: actions/upload-release-asset@v1
93+
env:
94+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
95+
with:
96+
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
97+
asset_path: FSharp.CosmosDb.Analyzer.${{ github.ref }}.snupkg
98+
asset_name: FSharp.CosmosDb.Analyzer.${{ github.ref }}.snupkg
99+
asset_content_type: application/zip
100+
37101
publish-github:
38102
needs: build
39103
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)