-
Notifications
You must be signed in to change notification settings - Fork 1
56 lines (45 loc) · 1.45 KB
/
build_cli.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
53
54
55
56
name: Build CLI
on:
push:
tags:
- "v*"
jobs:
build:
runs-on: ${{ matrix.os[0]}}
strategy:
matrix:
os: [[ubuntu-latest, linux], [windows-latest, windows], [macos-latest, mac]]
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v1
with:
python-version: "3.10"
- name: Setup Poetry
uses: Gr1N/setup-poetry@v7
- name: Install Poetry Packages
run: poetry install
- name: Run Build Script
run: make build
- name: Rename Executables
run: |
# If dist/redownload-cli exists, rename it dist/redownload-cli-${{ matrix.os[1] }}
FILE='./dist/redownload-cli'
FILE_WITH_PLATFORM="./dist/redownload-cli-${{ matrix.os[1] }}"
if [ -f "$FILE" ]; then
mv $FILE $FILE_WITH_PLATFORM
fi
# If dist/redownload-cli.exe exists, rename it dist/redownload-cli-${{ matrix.os[1] }}.exe
FILE='./dist/redownload-cli.exe'
FILE_WITH_PLATFORM="./dist/redownload-cli-${{ matrix.os[1] }}.exe"
if [ -f "$FILE" ]; then
mv $FILE $FILE_WITH_PLATFORM
fi
shell: bash
- name: Upload Executables
uses: softprops/[email protected]
with:
files: |
dist/redownload-cli-${{ matrix.os[1] }}
dist/redownload-cli-${{ matrix.os[1] }}.exe