generated from IBM/repo-template
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: updates workflow for v9 of semantic release (#46)
* fix: pins semantic release to version v7 and adds an optional minor flag The latest version of semantic-release does not support setup.cfg. Pinning to the same version as compliance-trestle so the upgrades can be made in sync. This project is still in beta so adding an option to force minor releases for breaking changes. Signed-off-by: Jennifer Power <[email protected]> * chore: fixes formatting on Makefile Signed-off-by: Jennifer Power <[email protected]> * chore: set MINOR variable on python-push.yml * refactor: updates semantic release to 9.8.0 Align semantic release update logic with trestle Signed-off-by: Jennifer Power <[email protected]> * chore: moves MINOR env logic from Makefile This is handled through pyproject.toml Signed-off-by: Jennifer Power <[email protected]> * ci(deps): updates actions/checkout to v4 in python-push workflow Signed-off-by: Jennifer Power <[email protected]> --------- Signed-off-by: Jennifer Power <[email protected]>
- Loading branch information
Showing
4 changed files
with
67 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,7 +26,7 @@ jobs: | |
- name: Don't mess with line endings | ||
run: | | ||
git config --global core.autocrlf false | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
- name: Set up Python ${{ matrix.python-version }} | ||
|
@@ -78,28 +78,45 @@ jobs: | |
deploy: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
id-token: write | ||
environment: | ||
name: release | ||
url: https://pypi.org/p/compliance-trestle-fedramp | ||
needs: build | ||
if: github.ref == 'refs/heads/main' && github.repository == 'oscal-compass/compliance-trestle-fedramp' | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: true | ||
fetch-depth: 0 | ||
token: ${{ secrets.ADMIN_PAT }} | ||
- name: Set up Python 3.9 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.9 | ||
- name: Install build tools | ||
run: | | ||
make develop | ||
- name: Create release | ||
shell: bash | ||
env: | ||
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} | ||
GH_TOKEN: ${{ secrets.ADMIN_PAT }} | ||
run: | | ||
make release | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
fetch-depth: 0 | ||
token: ${{ secrets.ADMIN_PAT }} | ||
- name: Set up Python 3.11 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.11 | ||
- name: Install build tools | ||
run: | | ||
make develop | ||
# This action uses Python Semantic Release v8 | ||
- name: Python Semantic Release | ||
id: release | ||
uses: python-semantic-release/[email protected] | ||
with: | ||
github_token: ${{ secrets.ADMIN_PAT }} | ||
|
||
- name: Publish package distributions to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
# NOTE: DO NOT wrap the conditional in ${{ }} as it will always evaluate to true. | ||
# See https://github.com/actions/runner/issues/1173 | ||
if: steps.release.outputs.released == 'true' | ||
|
||
- name: Publish package distributions to GitHub Releases | ||
uses: python-semantic-release/[email protected] | ||
if: steps.release.outputs.released == 'true' | ||
with: | ||
github_token: ${{ secrets.ADMIN_PAT }} | ||
|
||
merge-main-to-develop: | ||
name: Merge main -> develop | ||
|
@@ -110,7 +127,7 @@ jobs: | |
cancel-in-progress: true | ||
if: github.ref == 'refs/heads/main' | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
ref: main | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters