Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release Pipeline TEST #8

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 80 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: Build & Publish Package

on:
push:
tags: '*'
release:
types: published
workflow_dispatch:

jobs:
build:
name: Build & Verify Package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Create Wheel
run: |
pip install wheel
pip wheel . --no-deps --wheel-dir dist
ls -lat dist
- name: Check Wheel
shell: bash
run: |
pip install check-wheel-contents
check-wheel-contents dist/*.whl
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: Wheels
path: dist

# Upload to Test PyPI on every push to main.
release-test-pypi:
name: Publish to test.pypi.org
environment: release-test-pypi
if: github.repository_owner == 'emdgroup' #&& github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
runs-on: ubuntu-latest
needs: build
steps:
- name: Download packages built
uses: actions/download-artifact@v3
with:
name: Wheels
path: dist
- shell: bash
working-directory: dist
run: |
ls -a
# - name: Upload package to Test PyPI
# uses: pypa/gh-action-pypi-publish@release/v1
# with:
# repository-url: https://test.pypi.org/legacy/
# password: ${{ secrets.TEST_PYPI_TOKEN }}

# Upload to real PyPI on GitHub Releases.
release-pypi:
name: Publish to pypi.org
environment: release-pypi
if: github.repository_owner == 'emdgroup' #&& github.event.action == 'published'
runs-on: ubuntu-latest
needs: release-test-pypi
steps:
- name: Download packages built
uses: actions/download-artifact@v3
with:
name: Wheels
path: dist
- shell: bash
working-directory: dist
run: |
ls -a
# - name: Upload package to PyPI
# uses: pypa/gh-action-pypi-publish@release/v1
# with:
# password: ${{ secrets.PYPI_TOKEN }}
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
### Added
- Github CI pipelines
- Github release pipeline

### Changed
- Now has concise contribution guidelines
Expand Down