Skip to content

Commit

Permalink
Update python-pacage-ci-cd to v1.1.0 and use tokens to upload to PyPI (
Browse files Browse the repository at this point in the history
…#291)

* chore: Remove an unneeded dependency

* ci: Add a new pre-commit hook to better lint GitHub Workflows

* ci: Update version of python-package-ci-cd workflows.

Add secrets for uploading to PyPI.

* docs: Update changelog
  • Loading branch information
nfelt14 authored Aug 28, 2024
1 parent 1c16f5a commit cb5b372
Show file tree
Hide file tree
Showing 14 changed files with 25 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check-api-for-breaking-changes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ on:
branches: [main]
jobs:
check-api-for-breaking-changes:
uses: tektronix/python-package-ci-cd/.github/workflows/_reusable-check-api-for-breaking-changes.yml@v1.0.3
uses: tektronix/python-package-ci-cd/.github/workflows/_reusable-check-api-for-breaking-changes.yml@v1.1.0
with:
package-name: tm_devices
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
- cron: 17 16 * * 4
jobs:
analyze:
uses: tektronix/python-package-ci-cd/.github/workflows/_reusable-codeql-analysis.yml@v1.0.3
uses: tektronix/python-package-ci-cd/.github/workflows/_reusable-codeql-analysis.yml@v1.1.0
with:
languages-array: '["python", "javascript"]'
codeql-queries: security-extended,security-and-quality
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/enforce-community-standards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ on:
branches: [main]
jobs:
enforce-community-standards:
uses: tektronix/python-package-ci-cd/.github/workflows/_reusable-enforce-community-standards.yml@v1.0.3
uses: tektronix/python-package-ci-cd/.github/workflows/_reusable-enforce-community-standards.yml@v1.1.0
2 changes: 1 addition & 1 deletion .github/workflows/package-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ concurrency:
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
package-build:
uses: tektronix/python-package-ci-cd/.github/workflows/_reusable-package-build.yml@v1.0.3
uses: tektronix/python-package-ci-cd/.github/workflows/_reusable-package-build.yml@v1.1.0
with:
package-name: tm_devices
python-versions-array: '["3.8", "3.9", "3.10", "3.11", "3.12"]' # when updating this, make sure to update all workflows that use this strategy
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/package-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ concurrency:
group: pypi
jobs:
package-release:
uses: tektronix/python-package-ci-cd/.github/workflows/_reusable-package-release.yml@v1.0.3
uses: tektronix/python-package-ci-cd/.github/workflows/_reusable-package-release.yml@v1.1.0
with:
package-name: tm_devices
repo-name: tektronix/tm_devices
Expand All @@ -36,3 +36,5 @@ jobs:
checkout-token: ${{ secrets.TEK_OPENSOURCE_TOKEN }}
ssh-signing-key-private: ${{ secrets.TEK_OPENSOURCE_SSH_SIGNING_KEY_PRIVATE }}
ssh-signing-key-public: ${{ secrets.TEK_OPENSOURCE_SSH_SIGNING_KEY_PUBLIC }}
pypi-api-token: ${{ secrets.PYPI_API_TOKEN }}
test-pypi-api-token: ${{ secrets.TEST_PYPI_API_TOKEN }}
4 changes: 3 additions & 1 deletion .github/workflows/package-testpypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@ concurrency:
group: pypi
jobs:
package-testpypi:
uses: tektronix/python-package-ci-cd/.github/workflows/_reusable-package-testpypi.yml@v1.0.3
uses: tektronix/python-package-ci-cd/.github/workflows/_reusable-package-testpypi.yml@v1.1.0
with:
package-name: tm_devices
repo-name: tektronix/tm_devices
permissions:
contents: read
id-token: write
attestations: write
secrets:
test-pypi-api-token: ${{ secrets.TEST_PYPI_API_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/publish-api-comparison.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
types: [completed]
jobs:
publish-api-comparison:
uses: tektronix/python-package-ci-cd/.github/workflows/_reusable-publish-api-comparison.yml@v1.0.3
uses: tektronix/python-package-ci-cd/.github/workflows/_reusable-publish-api-comparison.yml@v1.1.0
permissions:
checks: write
pull-requests: write
2 changes: 1 addition & 1 deletion .github/workflows/publish-test-results.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
types: [completed]
jobs:
publish-test-results:
uses: tektronix/python-package-ci-cd/.github/workflows/_reusable-publish-test-results.yml@v1.0.3
uses: tektronix/python-package-ci-cd/.github/workflows/_reusable-publish-test-results.yml@v1.1.0
with:
operating-systems-array: '["ubuntu", "windows", "macos"]'
permissions:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sbom-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
types: [published]
jobs:
sbom-scan:
uses: tektronix/python-package-ci-cd/.github/workflows/_reusable-sbom-scan.yml@v1.0.3
uses: tektronix/python-package-ci-cd/.github/workflows/_reusable-sbom-scan.yml@v1.1.0
permissions:
security-events: write
contents: write
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ concurrency:
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
test-code:
uses: tektronix/python-package-ci-cd/.github/workflows/_reusable-test-code.yml@v1.0.3
uses: tektronix/python-package-ci-cd/.github/workflows/_reusable-test-code.yml@v1.1.0
with:
repo-name: tektronix/tm_devices
operating-systems-array: '["ubuntu", "windows", "macos"]'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ concurrency:
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
test-docs:
uses: tektronix/python-package-ci-cd/.github/workflows/_reusable-test-docs.yml@v1.0.3
uses: tektronix/python-package-ci-cd/.github/workflows/_reusable-test-docs.yml@v1.1.0
with:
node-version: 20 # The node version needs to stay in sync with .readthedocs.yml
python-version: '3.11' # This needs to stay in sync with .readthedocs.yml and the tox config in pyproject.toml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches: [main]
jobs:
update-python-and-pre-commit-dependencies:
uses: tektronix/python-package-ci-cd/.github/workflows/_reusable-update-python-and-pre-commit-dependencies.yml@v1.0.3
uses: tektronix/python-package-ci-cd/.github/workflows/_reusable-update-python-and-pre-commit-dependencies.yml@v1.1.0
with:
commit-user-name: ${{ vars.TEK_OPENSOURCE_NAME }}
commit-user-email: ${{ vars.TEK_OPENSOURCE_EMAIL }}
Expand Down
5 changes: 5 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ repos:
- id: check-github-actions
- id: check-github-workflows
args: [--verbose]
- repo: https://github.com/Mateusz-Grzelinski/actionlint-py
rev: c01fb5723b54075325cd9b5e5665a9ae84baf950 # frozen: v1.7.1.15
hooks:
- id: actionlint
additional_dependencies: [pyflakes, shellcheck-py]
- repo: https://github.com/commitizen-tools/commitizen
rev: d7e01aa9b0cfe3c1b732e66d523bbd0656221127 # frozen: v3.29.0
hooks:
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ Valid subsections within a version are:

Things to be included in the next release go here.

### Changed

- Switched all workflows to use the new [`tektronix/python-package-ci-cd`](https://github.com/tektronix/python-package-ci-cd) reusable workflows.

---

## v2.3.0 (2024-08-23)
Expand Down

0 comments on commit cb5b372

Please sign in to comment.