-
Notifications
You must be signed in to change notification settings - Fork 7
69 lines (58 loc) · 1.91 KB
/
build-python.yml
File metadata and controls
69 lines (58 loc) · 1.91 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
60
61
62
63
64
65
66
67
68
69
# This workflow will build a python script, generate an executable and upload it.
name: Build python script
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
build:
strategy:
matrix:
os: [windows, macos, ubuntu]
runs-on: ${{ matrix.os }}-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pyinstaller
- name: Build script
run: |
bash "${{ github.workspace }}/scripts/build_installer.sh" "${{matrix.os}}-install-checkpoint"
- name: Upload Artifacts - [macOS, Ubuntu]
if: ${{ matrix.os }} != windows
uses: actions/upload-artifact@v3
with:
name: ${{matrix.os}} Installer
path: dist/${{matrix.os}}-install-checkpoint
- name: Upload Artifacts - [windows]
if: ${{ matrix.os }} == windows
uses: actions/upload-artifact@v3
with:
name: ${{matrix.os}} Installer
path: dist/${{matrix.os}}-install-checkpoint.exe
publish-to-s3:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v2
- name: Download Artifacts
uses: actions/download-artifact@v3
with:
path: dist/
- name: Upload to S3
uses: medlypharmacy/s3-artifacts-action@master
with:
aws_access_key_id: ${{ secrets.S3_BUILD_ARTIFACTS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.S3_BUILD_ARTIFACTS_SECRET_ACCESS_KEY }}
aws_s3_bucket_name: ${{ secrets.S3_BUCKET_NAME }}
source_path: "dist"
destination_path: "installers"
exclude_repo_from_destination_path: true
resource_type: "DIRECTORY"