Skip to content

Commit

Permalink
Add publish workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
pllim committed Dec 10, 2024
1 parent 769ff8d commit eab0172
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/ci_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,21 @@
name: CI Tests

on:
schedule:
# run every Wednesday at 6am UTC
- cron: '0 6 * * 3'
push:
branches:
- main
tags:
- '*'
pull_request:
branches: # only build on PRs against 'main' if you need to further limit when CI is run.
- main

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
Expand Down
32 changes: 32 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Wheel building

on:
push:
branches:
- main
tags:
- '*'
pull_request:
branches: # only build on PRs against 'main' if you need to further limit when CI is run.
- main

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build_and_publish:
permissions:
contents: none
uses: OpenAstronomy/github-actions-workflows/.github/workflows/publish_pure_python.yml@d68193b68216da64eafaa618f53c59f5d271c56e # v1.14.0
if: github.repository == 'astropy/astroplan'
with:
# We upload to PyPI for all tags starting with v but not ones ending in .dev
upload_to_pypi: ${{ startsWith(github.ref, 'refs/tags/v') && !endsWith(github.ref, '.dev') && (github.event_name == 'push') }}
test_extras: test
test_command: pytest -p no:warnings --astropy-header --pyargs astroplan
secrets:
pypi_token: ${{ secrets.PYPI_TOKEN }}

0 comments on commit eab0172

Please sign in to comment.