-
Notifications
You must be signed in to change notification settings - Fork 22
70 lines (66 loc) · 1.92 KB
/
local_package_build.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
name: Local Package Build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
ubuntu:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # All branches and anything
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install Ubuntu packages
run: |
sudo apt install -y python3-pip
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install build
- name: Local Python Packaging
run: |
python3 -m build
- name: Check version tag push
if: github.event_name == 'push'
run: |
source scripts/validate_package_version.sh
validate_package_version_wo_sha "${GITHUB_REF}"
- name: Check version tag PR
if: github.event_name == 'pull_request'
run: |
source scripts/validate_package_version.sh
validate_package_version_wo_sha ${{ github.event.pull_request.head.sha }}
windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # All branches and anything
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install dependencies
run: |
py -m pip install --upgrade pip
py -m pip install build
- name: Local Python Packaging
run: |
py -m build
- name: Check version tag push
if: github.event_name == 'push'
shell: bash
run: |
source scripts/validate_package_version.sh
validate_package_version_wo_sha "${GITHUB_REF}"
- name: Check version tag PR
if: github.event_name == 'pull_request'
shell: bash
run: |
source scripts/validate_package_version.sh
validate_package_version_wo_sha ${{ github.event.pull_request.head.sha }}