fix: Strategy heuristic test & fix (#203) #1
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
on: | |
push: | |
branches: | |
- main | |
permissions: | |
contents: write | |
pull-requests: write | |
name: release-please | |
jobs: | |
release-please: | |
runs-on: ubuntu-latest | |
outputs: | |
release_created: ${{ steps.release.outputs['libs/megaparse--release_created'] }} | |
release_created_sdk: ${{ steps.release.outputs['libs/megaparse_sdk--release_created'] }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 # Fetch all history for tags and releases | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
- name: Run release-please | |
id: release | |
uses: google-github-actions/release-please-action@v4 | |
with: | |
token: ${{ secrets.RELEASE_PLEASE_TOKEN }} | |
deploy-megaparse: | |
if: needs.release-please.outputs.release_created == 'true' | |
needs: release-please | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rye | |
uses: eifinger/setup-rye@v2 | |
with: | |
enable-cache: true | |
- name: Rye Sync | |
run: rye sync --no-lock | |
- name: Rye Build | |
run: cd libs/megaparse && rye build | |
- name: Rye Publish | |
run: cd libs/megaparse && rye publish --token ${{ secrets.PYPI_API_TOKEN }} --yes | |
deploy-sdk: | |
if: needs.release-please.outputs.release_created_sdk == 'true' | |
needs: release-please | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rye | |
uses: eifinger/setup-rye@v2 | |
with: | |
enable-cache: true | |
- name: Rye Sync | |
run: cd libs/megaparse_sdk && rye sync --no-lock | |
- name: Rye Build | |
run: cd libs/megaparse_sdk && rye build | |
- name: Rye Publish | |
run: cd libs/megaparse_sdk && rye publish --token ${{ secrets.PYPI_API_TOKEN }} --yes |