Skip to content

Commit

Permalink
debugging workflow errors, refactors workflow files
Browse files Browse the repository at this point in the history
  • Loading branch information
chaduhduh committed Oct 4, 2024
1 parent a26ff82 commit 8c62d8b
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 56 deletions.
55 changes: 0 additions & 55 deletions .github/workflows/datalab_pip.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/generate_docs.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Builds and deploys the python documentation using sphinx. Live documentation
# is available from the main Astro Data Lab website.
name: Deploy Documentation
name: Docs

env:
# these are defaults in case these values do not get set at runtime
Expand Down
38 changes: 38 additions & 0 deletions .github/workflows/release_pip.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Release

on:
release:
types: [released]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.11

- name: Install dependencies
run: pip install --upgrade setuptools wheel twine build

- name: Build pip package
run: |
rm -rf dist/ build/ datalab_client.egg-info/ astro_datalab.egg-info/
python -m build
- name: Upload package to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
# for testing purposes set the PYPI_REPO_URL to https://test.pypi.org/legacy/
#TODO: remove this test setting before merge
PYPI_REPO_URL: 'https://test.pypi.org/legacy/'
run: |
if [ -z "${{ env.PYPI_REPO_URL }}" ]; then
twine upload --verbose dist/*
else
twine upload --verbose --repository-url "${{ env.PYPI_REPO_URL }}" dist/*
fi
27 changes: 27 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Tests and Checks

on:
push:
branches:

jobs:
build-check:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11']

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install --upgrade pip
pip install --upgrade setuptools wheel twine build
- name: Build pip package
run: |
rm -rf dist/ build/ datalab_client.egg-info/ astro_datalab.egg-info/
python -m build

0 comments on commit 8c62d8b

Please sign in to comment.