-
Notifications
You must be signed in to change notification settings - Fork 66
44 lines (40 loc) · 1.42 KB
/
release_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
name: "[auto] Build Wheel for Release"
on:
workflow_call:
jobs:
build:
runs-on: [self-hosted, 1ES.Pool=iotupx-iot-cli-github-hosted-pool, 1ES.ImageOverride=Ubuntu20.04Compliant]
permissions:
contents: read
steps:
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- uses: actions/checkout@v4
- name: Build Wheel
run: |
pip install -r dev_requirements
python -m setup bdist_wheel -d dist
- name: Determine Wheel Version
run: |
wheel=$(find ./dist/*.whl)
echo "wheel=$wheel" >> $GITHUB_ENV
pip install $wheel
version=$(pip show azure_iot | grep Version: | awk '{print $2}')
echo "version=$version" >> $GITHUB_ENV
- name: Generate SBOM
run: |
curl -Lo $RUNNER_TEMP/sbom-tool https://github.com/microsoft/sbom-tool/releases/download/v2.2.3/sbom-tool-linux-x64
chmod +x $RUNNER_TEMP/sbom-tool
$RUNNER_TEMP/sbom-tool generate -b ./dist -bc . -pn "Azure IoT CLI Extension" -pv "${{ env.version }}" -ps Microsoft
- name: Upload Wheel Artifact
uses: actions/upload-artifact@v4
with:
path: ${{ env.wheel }}
name: azure-iot-cli-ext
- name: Upload SBOM Artifact
uses: actions/upload-artifact@v4
with:
path: dist/_manifest/
name: SBOM