Skip to content

Commit

Permalink
actions: add build, publish
Browse files Browse the repository at this point in the history
  • Loading branch information
akorosov committed Jan 11, 2022
1 parent 52ad155 commit 827bc4c
Show file tree
Hide file tree
Showing 3 changed files with 701 additions and 7 deletions.
19 changes: 16 additions & 3 deletions .github/workflows/python-package-conda.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
name: Python Package using Conda

on: [push]
on:
push:
release:
types: [released]

jobs:
run-tests:
test-build-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -42,4 +45,14 @@ jobs:
$CONDA/bin/pytest
env:
TEST_DATA_DIR: /home/runner/work/test_data/

- name: Build Python package
if: github.event_name == 'release'
run: >
GEODATASET_RELEASE="${GITHUB_REF#refs/tags/}"
python setup.py sdist bdist_wheel
- name: Publish Python package
if: github.event_name == 'release'
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository_url: https://upload.pypi.org/geodataset/
password: ${{ secrets.PYPI_TOKEN }}
Loading

0 comments on commit 827bc4c

Please sign in to comment.