bump. #132
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
name: Create Release PRs | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- jgadling/test-please | |
permissions: | |
contents: write | |
pull-requests: write | |
jobs: | |
release-please: | |
concurrency: | |
group: release-prs-${{ github.ref }} | |
cancel-in-progress: true | |
runs-on: ubuntu-latest | |
steps: | |
# See https://docs.github.com/en/actions/security-guides/automatic-token-authentication#using-the-github_token-in-a-workflow | |
# For why we need to generate a token and not use the default | |
- name: Generate token | |
id: generate_token | |
uses: tibdex/github-app-token@v2 | |
with: | |
app_id: ${{ secrets.CZI_RELEASE_PLEASE_APP_ID }} | |
private_key: ${{ secrets.CZI_RELEASE_PLEASE_PK }} | |
- name: release please | |
uses: googleapis/release-please-action@v4 | |
id: release | |
with: | |
# TODO Configuring using manifest file as workaround until we move the frontend to its own repo | |
manifest-file: "release-please.manifest.json" | |
config-file: "release-please.config.json" | |
target-branch: "main" | |
token: ${{ steps.generate_token.outputs.token }} | |
outputs: | |
paths_released: ${{ steps.release.outputs.paths_released }} | |
publish-pypi-package: | |
name: Build and publish Python package to PyPI | |
runs-on: ubuntu-latest | |
needs: release-please | |
if: contains(needs.release-please.outputs.paths_released, 'client/python/cryoet_data_portal') | |
environment: | |
name: pypi | |
url: https://pypi.org/p/cryoet-data-portal | |
permissions: | |
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing | |
steps: | |
- name: Checkout ref branch | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.ref }} | |
fetch-depth: 0 | |
- uses: actions/setup-python@v4 | |
with: | |
pyton-version: "3.10" | |
- name: build | |
run: | | |
make build -C client/python/cryoet_data_portal | |
- name: Publish distribution 📦 to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
packages-dir: client/python/cryoet_data_portal/dist |