Skip to content

chore: automate testpypi releases #85

chore: automate testpypi releases

chore: automate testpypi releases #85

Workflow file for this run

on:
push:
branches:
- main
pull_request: # TODO remove
branches:
- "*"
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: "tsmith/api_rc_version" # TODO revert to main
outputs:
ontology_assets_release_created: ${{ steps.release.outputs.ontology-assets--release_created }}
ontology_assets_upload_url: ${{ steps.release.outputs.ontology-assets--upload_url }}
python_release_created: ${{ steps.release.outputs.api/python--release_created }}

Check failure on line 28 in .github/workflows/release.yml

View workflow run for this annotation

GitHub Actions / release-please

Invalid workflow file

The workflow is not valid. .github/workflows/release.yml (Line: 28, Col: 31): Unexpected symbol: 'api/python--release_created'. Located at position 23 within expression: steps.release.outputs.api/python--release_created
add-release-artifacts:
runs-on: [ubuntu-latest]
needs: release-please
if: ${{ needs.release-please.outputs.ontology_assets_release_created == 'true' }}
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: ${{ needs.release-please.outputs.python_release_created == 'true' }}
steps:
- name: Checkout main branch
uses: actions/checkout@v4
with:
ref: main
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 }}