Skip to content

Commit 7ebc343

Browse files
authored
Add OIDC publish step to workflow (#7)
* Add publishing step * Add newline after secrets:inherit
1 parent f949723 commit 7ebc343

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

.github/workflows/dissect-ci.yml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,24 @@ on: [push, pull_request, workflow_dispatch]
44
jobs:
55
ci:
66
uses: fox-it/dissect-workflow-templates/.github/workflows/dissect-ci-template.yml@main
7-
secrets: inherit
7+
secrets: inherit
8+
9+
publish:
10+
if: ${{ github.ref_name == 'main' || github.ref_type == 'tag' }}
11+
needs: [ci]
12+
runs-on: ubuntu-latest
13+
environment: dissect_publish
14+
permissions:
15+
id-token: write
16+
steps:
17+
- uses: actions/download-artifact@v3
18+
with:
19+
name: packages
20+
path: dist/
21+
# According to the documentation, it automatically looks inside the `dist/` folder for packages.
22+
- name: Publish package distributions to Pypi
23+
uses: pypa/gh-action-pypi-publish@release/v1
24+
25+
trigger-tests:
26+
needs: [publish]
27+
uses: fox-it/dissect-workflow-templates/.github/workflows/dissect-ci-demand-test-template.yml@main

0 commit comments

Comments
 (0)