Skip to content

Commit

Permalink
Merge pull request #86 from LemurPwned/feat/workflow-fixes
Browse files Browse the repository at this point in the history
docker should install extra deps + workflow trigger fix
  • Loading branch information
LemurPwned authored Dec 6, 2024
2 parents cdc2cfb + ea42662 commit 13a504e
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 10 deletions.
30 changes: 22 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@

name: Python Package Publication

on:
pull_request:
types: [closed]
branches: [master]
paths:
- '**.cpp'
- '**.hpp'
- '**.py'
- 'setup.py'
- 'setup.cfg'
- 'pyproject.toml'
workflow_dispatch:
inputs:
release-version:
required: true
linux:
type: boolean
required: true
Expand All @@ -25,12 +29,14 @@ jobs:
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
with:
submodules: 'true'
- name: Get version
id: get_version
run: |
echo "version=$(python setup.py --version)" >> $GITHUB_OUTPUT
- name: Python wheels manylinux stable build
uses: RalfG/python-wheels-manylinux-build@v0.5.0
with:
Expand All @@ -57,6 +63,10 @@ jobs:
- uses: actions/checkout@v3
with:
submodules: 'true'
- name: Get version
id: get_version
run: |
echo "version=$(python setup.py --version)" >> $GITHUB_OUTPUT
- name: Set up Python
uses: actions/setup-python@v2
with:
Expand All @@ -77,12 +87,16 @@ jobs:
needs: [ linux-build, other-os-build ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Get version
id: get_version
run: |
echo "version=$(python setup.py --version)" >> $GITHUB_OUTPUT
- name: Create release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.event.inputs.release-version }}
run: |
gh release create "$tag" \
gh release create "v${{ steps.get_version.outputs.version }}" \
--repo="$GITHUB_REPOSITORY" \
--title="${GITHUB_REPOSITORY#*/} ${tag#v}" \
--title="${GITHUB_REPOSITORY#*/} v${{ steps.get_version.outputs.version }}" \
--generate-notes
3 changes: 1 addition & 2 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ RUN python3 -m pip install --upgrade pip
WORKDIR /scratch
RUN git clone --recurse-submodules https://github.com/LemurPwned/cmtj.git && \
cd cmtj && \
python3 -m pip install numpy scipy && \
python3 -m pip install .
python3 -m pip install .[utils]
WORKDIR /app
RUN python3 -c "import cmtj; from cmtj.utils import FieldScan"

0 comments on commit 13a504e

Please sign in to comment.