-
Notifications
You must be signed in to change notification settings - Fork 1
82 lines (69 loc) · 2.01 KB
/
data-parser-release.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: Parser-Release
on:
push:
branches: [ "parser-release" ]
pull_request:
branches: [ "parser-release" ]
jobs:
build:
strategy:
fail-fast: false
matrix:
python-version: ["3.10"]
poetry-version: ["1.4.2"]
os: [macos-latest, ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
defaults:
run:
working-directory: ./data-parser
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Run image
uses: abatilo/actions-poetry@v2
with:
poetry-version: ${{ matrix.poetry-version }}
- name: View poetry --help
run: poetry --help
- name: Install dependencies
run: poetry install
- name: install pyinstaller
run: poetry run pip install -U pyinstaller
- name: Build execution file
run: poetry run pyinstaller main.py --onefile
- name: Sign the macos-version build
if: ${{ matrix.os == 'macos-latest' }}
run: codesign --force -s - ./dist/main
- name: Rename built binary
run: poetry run mv ./dist/main ./dist/main-${{ matrix.os }}
- name: Store built binary
uses: actions/upload-artifact@v3
with:
name: parser-binary
path: data-parser/dist
retention-days: 5
release:
needs: build
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./data-parser
steps:
- name: Download built binary
uses: actions/download-artifact@v3
with:
name: parser-binary
path: ./dist/
- name: Release
uses: softprops/action-gh-release@v1
with:
files: ./dist/*
name: parser-binary
tag_name: release
permissions:
contents: write
# TODO:
# codesign --force -s - target/release/tmc-langs-cli for the mac release
# add this mac sign to gh actions and run the compilation