-
Notifications
You must be signed in to change notification settings - Fork 10
59 lines (50 loc) · 1.51 KB
/
Copy pathrelease.yml
File metadata and controls
59 lines (50 loc) · 1.51 KB
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
53
54
55
56
57
58
59
name: RELEASE
on:
release:
types:
- 'published'
jobs:
build:
name: Build Watcher
permissions: write-all
strategy:
matrix:
os: [macos-13, ubuntu-latest, windows-latest]
node-version: [16.x]
include:
- os: macos-13
platform: macOS
- os: ubuntu-latest
platform: linux
- os: windows-latest
platform: Windows
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Current Branch
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Setup node
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
- name: Install Dependencies
run: npm ci
- name: Build Application
run: |
cd ./services/watcher
npm run release
- name: MacOS/Linux Move and Rename Release file
if: ${{ matrix.platform != 'Windows' }}
run: |
mv ./bin/index watcher-service-${{ github.event.release.tag_name }}-${{ matrix.platform }}
- name: Windows Move and Rename Release file
if: ${{ matrix.platform == 'Windows' }}
run: |
mv ./bin/index.exe watcher-service-${{ github.event.release.tag_name }}-${{ matrix.platform }}.exe
- name: Upload File to Assets
uses: softprops/action-gh-release@v1
with:
files: watcher-service-${{ github.event.release.tag_name }}-*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}