-
Notifications
You must be signed in to change notification settings - Fork 1
87 lines (83 loc) · 2.81 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
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/release-please-action@v4.1.0
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 }}
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 }}