summaryrefslogtreecommitdiff
path: root/.github/workflows/package.yml
blob: 0014d93b90a77b6900b52a453457f30e9f1bf2c5 (plain)
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
name: Package

on:
  push:
    branches:
    - main
    - v*-branch
  pull_request:
    branches:
    - main
    - v*-branch
  workflow_call:

concurrency:
  group: ${{ github.ref }}
  cancel-in-progress: true

jobs:
  package:
    name: Package
    runs-on: ubuntu-22.04

    steps:
    - name: Set up Python
      uses: actions/setup-python@v5
      with:
        python-version: '3.10'

    - name: Check Python version
      run: |
        set -x
        python --version
        pip --version
        python -c "import platform; print(platform.architecture())"

    - name: Install Python dependencies
      run: |
        pip install --user setuptools wheel

    - name: Check out Kconfiglib source code
      uses: actions/checkout@v4

    - name: Build source distribution
      run: |
        python setup.py sdist

    - name: Build built distribution wheel
      run: |
        python setup.py bdist_wheel

    - name: Upload artifacts
      uses: actions/upload-artifact@v4
      with:
        name: dist
        path: dist/*