-
Notifications
You must be signed in to change notification settings - Fork 1
52 lines (49 loc) · 1.43 KB
/
release_workflow.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Build Mono
on:
push:
branches:
- master
tags:
- 'v*'
pull_request:
jobs:
build:
name: Build
runs-on: ubuntu-latest
env:
BUILD_DIR: build
RELEASE_ZIP: networkminer-cli.zip
steps:
- uses: actions/checkout@v4
- name: Build application
run: dotnet build --configuration=Release NetworkMinerCLI.sln -o $BUILD_DIR
- name: ZIP binaries
if: startsWith(github.event.ref, 'refs/tags')
run: |
pushd $BUILD_DIR
zip -r $RELEASE_ZIP ./
popd
mv $BUILD_DIR/$RELEASE_ZIP ./
zip $RELEASE_ZIP README.md ChangeLog LICENSE.txt # add README, ChangeLog and LICENSE
- name: Create GH Release
if: startsWith(github.event.ref, 'refs/tags')
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: networkminer-cli ${{ github.ref }}
draft: false
prerelease: false
- name: Upload GH Release Asset
if: startsWith(github.event.ref, 'refs/tags')
id: upload_release_asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./${{ env.RELEASE_ZIP }}
asset_name: ${{ env.RELEASE_ZIP }}
asset_content_type: application/zip