Skip to content

Release v0.2.0

Release v0.2.0 #20

Workflow file for this run

name: Package
on:
push:
tags:
- v*
jobs:
wheel:
runs-on: ubuntu-latest
name: Build wheel distribution
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: '3.12'
- name: Install build requirements
run: python -m pip install -U -r .github/workflows/requirements.txt
- name: Install build package
run: python -m pip install build
- name: Build source distribution
run: python -m build --wheel --outdir dist
- name: Store built source distribution
uses: actions/upload-artifact@v2
with:
name: wheels
path: dist/*
test-wheel:
runs-on: ubuntu-latest
name: Test wheel distribution
needs:
- wheel
steps:
- name: Setup Python 3.12
uses: actions/setup-python@v4
with:
python-version: '3.12'
- name: Download built wheels
uses: actions/download-artifact@v2
with:
name: wheels
path: dist/
- name: Update pip to latest version
run: python -m pip install -U pip setuptools wheel
- name: Install Pyrodigal pre-release
run: python -m pip install --pre pyrodigal
- name: Install built wheel
run: python -m pip install --only-binary pyrodigal-gv --find-links=dist pyrodigal-gv
- name: Run tests without coverage
run: python -m unittest pyrodigal_gv.tests -vv
sdist:
runs-on: ubuntu-latest
name: Build source distribution
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: 3.12
- name: Install build requirements
run: python -m pip install -U -r .github/workflows/requirements.txt
- name: Install build package
run: python -m pip install build
- name: Build source distribution
run: python -m build --sdist --outdir dist
- name: Store built source distribution
uses: actions/upload-artifact@v2
with:
name: wheels
path: dist/*
test-sdist:
runs-on: ubuntu-latest
name: Test source distribution
needs:
- sdist
steps:
- name: Setup Python 3.12
uses: actions/setup-python@v4
with:
python-version: '3.12'
- name: Download built wheels
uses: actions/download-artifact@v2
with:
name: wheels
path: dist/
- name: Update pip to latest version
run: python -m pip install -U pip setuptools wheel
- name: Install Pyrodigal pre-release
run: python -m pip install --pre pyrodigal
- name: Install built wheel
run: python -m pip install --no-binary pyrodigal-gv --find-links=dist pyrodigal-gv
- name: Run tests without coverage
run: python -m unittest pyrodigal_gv.tests -vv
upload:
environment: PyPI
runs-on: ubuntu-latest
permissions:
id-token: write
name: Upload
needs:
- sdist
- test-sdist
- wheel
- test-wheel
steps:
- uses: actions/download-artifact@v2
with:
name: wheels
path: dist
- uses: pypa/gh-action-pypi-publish@release/v1
if: startsWith(github.ref, 'refs/tags')
release:
environment: GitHub Releases
runs-on: ubuntu-latest
if: "!contains(github.ref, 'rc')"
name: Release
needs: upload
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: rasmus-saks/release-a-changelog-action@v1.0.1
with:
github-token: '${{ secrets.GITHUB_TOKEN }}'
# aur:
# environment: Arch Linux User Repository
# runs-on: ubuntu-latest
# if: "!contains(github.ref, 'rc')"
# name: Update AUR package
# needs:
# - sdist
# - upload
# steps:
# - uses: actions/checkout@v3
# with:
# submodules: true
# - name: Set up Python 3.10
# uses: actions/setup-python@v4
# with:
# python-version: '3.10'
# - name: Download built wheels
# uses: actions/download-artifact@v2
# with:
# name: wheels
# path: dist
# - name: Extract package version
# run: echo PKGVER=$(python setup.py --version) >> $GITHUB_ENV
# - name: Compute SHA256 of source distribution
# run: echo SHA256=$(sha256sum dist/pyrodigal-gv-${{ env.PKGVER }}.tar.gz | cut -f1 -d' ') >> $GITHUB_ENV
# - name: Generate PKGBUILD
# run: sed -e "s/%pkgver/${{ env.PKGVER }}/g" -e "s/%sha256sum/${{ env.SHA256 }}/g" pkg/aur/PKGBUILD.in > pkg/aur/PKGBUILD
# - name: Update package
# uses: KSXGitHub/github-actions-deploy-aur@v2.2.5
# with:
# pkgname: python-pyrodigal-gv
# pkgbuild: pkg/aur/PKGBUILD
# commit_username: ${{ secrets.AUR_USER }}
# commit_email: ${{ secrets.AUR_EMAIL }}
# ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
# commit_message: ${{ github.event.head_commit.message }}
# ssh_keyscan_types: rsa,dsa,ecdsa,ed25519