-
Notifications
You must be signed in to change notification settings - Fork 2
33 lines (33 loc) · 1.04 KB
/
publish.yaml
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
name: Publish JSON Schema or stac-model package via Github Release
on:
release:
types: [published]
jobs:
deploy-schema:
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
steps:
- name: Inject env variables
uses: rlespinasse/github-slug-action@v3.x
- uses: actions/checkout@v2
- name: deploy JSON Schema for version ${{ env.GITHUB_REF_SLUG }}
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: json-schema
destination_dir: ${{ env.GITHUB_REF_SLUG }}
publish-pypi:
if: startsWith(github.ref, 'refs/tags/stac-model-v')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2.2.2
with:
python-version: "3.10"
- name: Install poetry
run: make poetry-install
- name: Publish stac-model to PyPI
run: |
poetry build
poetry publish --username __token__ --password ${{ secrets.PYPI_SECRET }}