Skip to content

Commit 17c623c

Browse files
committed
[+] add release action
1 parent 612534c commit 17c623c

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

.github/workflows/release.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
on:
2+
push:
3+
tags:
4+
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
5+
6+
name: Upload Release Asset
7+
8+
jobs:
9+
build:
10+
name: Upload Release Asset
11+
runs-on: windows-latest
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v2
15+
- name: Build project # This would actually build your project, using zip for an example artifact
16+
run: |
17+
make.bat
18+
- name: Create Release
19+
id: create_release
20+
uses: actions/create-release@v1
21+
env:
22+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
23+
with:
24+
tag_name: ${{ github.ref }}
25+
release_name: Release ${{ github.ref }}
26+
draft: false
27+
prerelease: false
28+
- name: Upload Release Asset
29+
id: upload-release-asset
30+
uses: actions/upload-release-asset@v1
31+
env:
32+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33+
with:
34+
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
35+
asset_path: ./patroni-win-x64.zip
36+
asset_name: patroni-win-x64.zip
37+
asset_content_type: application/zip

0 commit comments

Comments
 (0)