chore: release main (#130) #93
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: [self-hosted, ARM64] | |
steps: | |
- name: release please | |
uses: google-github-actions/[email protected] | |
id: release | |
with: | |
manifest-file: ".release-please-manifest.json" | |
config-file: "release-please-config.json" | |
target-branch: "main" | |
outputs: | |
ontology_assets_upload_url: ${{ steps.release.outputs.ontology-assets--upload_url }} | |
paths_released: ${{ steps.release.outputs.paths_released }} | |
add-release-artifacts: | |
runs-on: [ubuntu-latest] | |
needs: release-please | |
if: contains(needs.release-please.outputs.paths_released, 'ontology-assets') | |
strategy: | |
matrix: | |
include: | |
- file_name: "ontology_info.json" | |
content_type: "application/yml" | |
- file_name: "all_ontology.json.gz" | |
content_type: "application/zip" | |
- file_name: "cell_class_list.json" | |
content_type: "application/json" | |
- file_name: "cell_subclass_list.json" | |
content_type: "application/json" | |
- file_name: "organ_list.json" | |
content_type: "application/json" | |
- file_name: "tissue_general_list.json" | |
content_type: "application/json" | |
- file_name: "system_list.json" | |
content_type: "application/json" | |
steps: | |
- name: Checkout main branch | |
uses: actions/checkout@v4 | |
with: | |
ref: main | |
fetch-depth: 1 | |
- name: Upload release asset | |
uses: actions/upload-release-asset@v1 | |
with: | |
upload_url: ${{ needs.release-please.outputs.ontology_assets_upload_url }} | |
asset_path: "ontology-assets/${{ matrix.file_name }}" | |
asset_name: ${{ matrix.file_name }} | |
asset_content_type: ${{ matrix.content_type }} | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
publish-pypi-package: | |
runs-on: [ubuntu-latest] | |
needs: release-please | |
if: contains(needs.release-please.outputs.paths_released, 'api/python') | |
steps: | |
- name: Checkout main branch | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.ref }} | |
fetch-depth: 1 | |
- name: Set up Python 3.11 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.11 | |
- name: build and publish | |
# TODO change to make publish | |
run: | | |
make test/publish -C api/python | |
env: | |
TWINE_USERNAME: __token__ | |
TWINE_PASSWORD: ${{ secrets.TESTPYPI_TOKEN_BENTO007 }} |