Skip to content

setup better python package builds for iriscasttools #193

setup better python package builds for iriscasttools

setup better python package builds for iriscasttools #193

name: Cloud Energy Collection Tests

Check failure on line 1 in .github/workflows/iriscast_package_build.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/iriscast_package_build.yaml

Invalid workflow file

(Line: 49, Col: 12): Job 'publish' depends on unknown job 'release'.
on:
push:
branches:
- master
paths:
- "iriscasttools/**"
- ".github/workflows/iriscast_package_build.yaml"
pull_request:
paths:
- "iriscasttools/**"
- ".github/workflows/iriscast_package_build.yaml"
jobs:
test_and_lint:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.x", "3.10"]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Navigate to Folder
run: cd ./iriscasttools
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel build
- name: Build package
run: |
python -m build
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: dist-${{ matrix.python-version }}
path: dist/
publish:
needs: release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: dist
- name: Generate Changelog
id: changelog
run: |
if [ -z "${{ github.event.inputs.changelog }}" ]; then
echo "changelog=Release version ${{ github.event.inputs.version }}" >> $GITHUB_OUTPUT
else
echo "changelog=${{ github.event.inputs.changelog }}" >> $GITHUB_OUTPUT
fi
- name: Create Git Tag
uses: EndBug/latest-tag@latest
with:
tag-name: v${{ github.event.inputs.version }}
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
tag_name: v${{ github.event.inputs.version }}
body: ${{ steps.changelog.outputs.changelog }}
files: |
dist/**/*.whl
dist/**/*.tar.gz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}