Skip to content

Commit

Permalink
refactor: add release-please-config
Browse files Browse the repository at this point in the history
  • Loading branch information
rabii-chaarani committed Oct 4, 2024
1 parent 0995a33 commit 6516041
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 19 deletions.
33 changes: 14 additions & 19 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -250,26 +250,21 @@ jobs:
name: loopprojectfile-conda-${{ matrix.os }}-${{ matrix.python-version }}
path: conda

# release-please:
# runs-on: ubuntu-latest
# if: github.ref == 'refs/heads/master'
# steps:
# - uses: actions/checkout@v4
# - uses: GoogleCloudPlatform/release-please-action@v4
# id: release
# with:
# release-type: python
# commit-search-depth: 10 # Fetch history for commits
# release-search-depth: 1 # Fetch history for tags and branches
# package-name-file: './pyproject.toml'
# bump-minor-pre-major: true # Enable bumping minor version for pre-major releases
# bump-patch-for-minor-pre-major: true # Enable bumping patch version for minor pre-major releases
# # outputs:
# # release_created: ${{ steps.release.outputs.release_created }}
# #if a release is created then run the deploy scripts for github.io, conda, pypi and docker
release-please:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v4
- uses: googleapis/release-please-action@v4
id: release
with:
config-file: 'release-please-config.json'
# outputs:
# release_created: ${{ steps.release.outputs.release_created }}
#if a release is created then run the deploy scripts for github.io, conda, pypi and docker

conda-upload:
needs: [conda-build]
needs: [release-please, conda-build]
runs-on: ${{matrix.os}}
strategy:
fail-fast: false
Expand All @@ -296,7 +291,7 @@ jobs:
pypi-upload:
runs-on: "ubuntu-latest"
needs: [pip-test-wheels]
needs: [release-please, pip-test-wheels]
# if: ${{ needs.release-please.outputs.release_created }}
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
Expand Down
14 changes: 14 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"packages": {
".": {
"release-type": "python",
"bump-minor-pre-major": true,
"bump-minor-pre-major-pattern": "feat",
"bump-patch-for-minor-pre-major": true,
"bump-patch-for-minor-pre-major-pattern": "fix",
"release-search-depth": 1,
"commit-search-depth": 10,
"version-file": "./LoopProjectFile/Version.py"
}
}
}

0 comments on commit 6516041

Please sign in to comment.