Skip to content

Commit 42881f1

Browse files
authored
Merge pull request #26 from IABTechLab/kcc-UID2-2330-create-workflow-for-python
UID2-2330 Add workflow to build and publish pypi packages
2 parents 330ba49 + 71c8b7a commit 42881f1

File tree

3 files changed

+46
-19
lines changed

3 files changed

+46
-19
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Build and Publish PyPi Packages
2+
run-name: ${{ format('Release {0}', inputs.release_type)}} Package by @${{ github.actor }}
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
release_type:
7+
type: choice
8+
description: The type of release
9+
options:
10+
- Major
11+
- Minor
12+
- Patch
13+
publish_vulnerabilities:
14+
type: string
15+
default: true
16+
vulnerability_failure_severity:
17+
description: The severity to fail the workflow if such vulnerability is detected. DO NOT override it unless a Jira ticket is raised. Must be one of ['CRITICAL', 'CRITICAL,HIGH' or 'CRITICAL,HIGH,MEDIUM'] (without space in between).
18+
type: string
19+
default: 'CRITICAL,HIGH'
20+
21+
jobs:
22+
build-and-pubish:
23+
name: Build and publish Python packages to PyPi
24+
uses: IABTechLab/uid2-shared-actions/.github/workflows/shared-publish-to-pypi-versioned.yaml@v2
25+
with:
26+
release_type: ${{ inputs.release_type }}
27+
publish_vulnerabilities: ${{ inputs.publish_vulnerabilities }}
28+
vulnerability_failure_severity: ${{ inputs.vulnerability_failure_severity }}
29+
secrets: inherit

.github/workflows/publish.yaml

Lines changed: 0 additions & 19 deletions
This file was deleted.

version.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"$schema": "https://github.com/dotnet/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json",
3+
"version": "2.2",
4+
"publicReleaseRefSpec": [
5+
"^refs/heads/master$",
6+
"^refs/heads/v\\d+(?:\\.\\d+)?$"
7+
],
8+
"cloudBuild": {
9+
"setVersionVariables": true,
10+
"buildNumber": {
11+
"enabled": true,
12+
"includeCommitId": {
13+
"when": "always"
14+
}
15+
}
16+
}
17+
}

0 commit comments

Comments
 (0)