Skip to content

Commit

Permalink
move release action for stac-model to publish.yaml to use published r…
Browse files Browse the repository at this point in the history
…elease type
  • Loading branch information
rbavery committed May 2, 2024
1 parent 4756e04 commit ee08e6d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 17 deletions.
18 changes: 16 additions & 2 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Publish JSON Schema
name: Publish JSON Schema or stac-model package via Github Release
on:
release:
types: [published]
jobs:
deploy:
deploy-schema:
if: startsWith(github.ref, 'refs/tags/v') && !startsWith(github.ref, 'refs/tags/stac-model-v')
runs-on: ubuntu-latest
steps:
Expand All @@ -16,3 +16,17 @@ jobs:
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/[email protected]
with:
python-version: 3.10
- name: Install poetry
run: make poetry-install
- name: Build and publish
run: |
poetry publish --build
15 changes: 0 additions & 15 deletions .github/workflows/stac-model.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,3 @@ jobs:
- name: Run tests
run: |
make test
publish:
if: startsWith(github.ref, 'refs/tags/stac-model-v')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/[email protected]
with:
python-version: 3.10
- name: Install poetry
run: make poetry-install
- name: Build and publish
run: |
poetry publish --build

0 comments on commit ee08e6d

Please sign in to comment.