Skip to content

Commit

Permalink
Chore: Enable fixed twine check, publish flag (#95)
Browse files Browse the repository at this point in the history
Signed-off-by: Matthew Watkins <[email protected]>
  • Loading branch information
ModeSevenIndustrialSolutions authored Jul 30, 2024
1 parent 9e13aaa commit 8128302
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
16 changes: 9 additions & 7 deletions .github/workflows/repository.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ on:
env:
DEFAULT-PYTHON: "3.10"
ARTEFACTS: "dist"
# Configures publishing to PyPI
PUBLISH: "true"

jobs:
Expand Down Expand Up @@ -179,11 +180,11 @@ jobs:
with:
artefacts: ${{ env.artefacts}}

#- name: "Validate Artefacts with Twine"
# id: python-twine-check
# with:
# path: ${{ env.artefacts}}
# uses: os-climate/devops-reusable-workflows/.github/actions/python-twine-check@main
- name: "Validate Artefacts with Twine"
id: python-twine-check
with:
path: ${{ env.artefacts}}
uses: os-climate/devops-reusable-workflows/.github/actions/python-twine-check@main

- name: "Store the distribution packages"
uses: actions/upload-artifact@v4
Expand All @@ -210,11 +211,12 @@ jobs:
permissions:
# IMPORTANT: mandatory to publish artefacts
contents: write
# Ensure development builds are NOT uploaded when build naming is b0rked
# Ensure development builds are NOT uploaded when build naming is broken
if: github.ref_name != 'main'
steps:
- name: "⬇ Download build artefacts"
uses: actions/download-artifact@v4

with:
name: ${{ github.ref_name }}
path: ${{ env.artefacts }}
Expand Down Expand Up @@ -260,7 +262,6 @@ jobs:
name: "Test Package Publishing"
# Only publish on tag pushes
# if: startsWith(github.ref, 'refs/tags/')
if: vars.publish == 'true'
needs: python-build
runs-on: ubuntu-latest
environment:
Expand All @@ -271,6 +272,7 @@ jobs:
steps:
- name: "Download build artefacts"
uses: actions/download-artifact@v4
if: env.publish == 'true'
with:
name: ${{ github.ref_name }}
path: ${{ env.artefacts }}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: 2024 The Linux Foundation <https://linuxfoundation.org>
2 changes: 2 additions & 0 deletions tests/twine/devops_reusable_workflows-0.0.1.tar.gz.license
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: 2024 The Linux Foundation <https://linuxfoundation.org>

0 comments on commit 8128302

Please sign in to comment.