-
Notifications
You must be signed in to change notification settings - Fork 77
52 lines (44 loc) · 1.37 KB
/
ci.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: NTop CI
# Trigger on every master branch push and pull request
on:
push:
branches:
- master
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Run CMake
run: cmake -DCMAKE_BUILD_TYPE=Release .
- name: Run Build
run: cmake --build . --config Release
- name: Set version
id: set_version
run: echo "VERSION=v0.3.$((${{ github.run_number }} + 4))" >> $GITHUB_ENV
shell: bash
- name: create release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.VERSION }}
release_name: ${{ env.VERSION }}
body: |
${{ github.event.head_commit.message }}
draft: false
prerelease: false
- name: Upload release asset
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: .\Release\NTop.exe
asset_name: NTop.exe
asset_content_type: application/vnd.microsoft.portable-executable