File tree Expand file tree Collapse file tree 1 file changed +30
-7
lines changed
Expand file tree Collapse file tree 1 file changed +30
-7
lines changed Original file line number Diff line number Diff line change 11name : Release Workflow
22
33on :
4- workflow_run :
5- workflows :
6- - CI
7- types :
8- - completed
4+ push :
5+ branches :
6+ - main
7+ workflow_dispatch :
98
109permissions :
1110 contents : write # Required for creating releases
@@ -21,7 +20,7 @@ concurrency:
2120
2221jobs :
2322 semantic-release :
24- if : ${{ github.ref == 'refs/heads/main' && github.event.workflow_run.conclusion == 'success' }}
23+ if : ${{ github.ref == 'refs/heads/main' }}
2524 runs-on : ubuntu-latest
2625 steps :
2726 - uses : actions/checkout@v4
@@ -51,12 +50,36 @@ jobs:
5150 permissions :
5251 contents : write
5352 actions : read
53+ security-events : write
5454 steps :
5555 - uses : actions/checkout@v4
5656 - name : Generate SBOM
57- uses : anchore/sbom-action@0.20.0
57+ uses : anchore/sbom-action@v0
5858 with :
5959 path : . # Generate SBOM for the entire repository
6060 artifact-name : sbom.spdx.json # Name of the generated SBOM file
6161 format : spdx-json # Use SPDX format for SBOM
6262 dependency-snapshot : true # Include dependency snapshot
63+
64+ publish-testpypi :
65+ needs : semantic-release
66+ if : ${{ github.ref == 'refs/heads/main' }}
67+ runs-on : ubuntu-latest
68+ steps :
69+ - uses : actions/checkout@v4
70+ - name : Set up Python
71+ uses : actions/setup-python@v5
72+ with :
73+ python-version : 3.11
74+ - name : Install dependencies
75+ run : |
76+ pip install poetry
77+ poetry install --with dev
78+ - name : Build package
79+ run : |
80+ poetry build
81+ - name : Publish to TestPyPI
82+ uses : pypa/gh-action-pypi-publish@release/v1
83+ with :
84+ password : ${{ secrets.TESTPYPI_API_TOKEN }}
85+ repository-url : https://test.pypi.org/legacy/
You can’t perform that action at this time.
0 commit comments