-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Included action.yml for publishing PyPI
- Changed name of conda publish action - Added action for PyPI publish - Changed workflow to deploy nightly to include PyPI package deployment - Changed versioning to match allowed formats by PyPI
- Loading branch information
1 parent
74e918c
commit 81c1afc
Showing
5 changed files
with
48 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Build and upload pypi package | ||
|
||
inputs: | ||
token: | ||
description: 'PyPI API Token' | ||
required: true | ||
|
||
description: Build and upload pypi package | ||
runs: | ||
using: "composite" | ||
|
||
steps: | ||
- name: Make build-env-pypi | ||
shell: bash -l {0} | ||
run: | | ||
conda config --set always_yes yes --set changeps1 no | ||
conda create -n build-env-pypi python=3.10.* | ||
conda activate build-env-pypi | ||
mamba install -c conda-forge python-build twine | ||
- name: Build package | ||
shell: bash -l {0} | ||
run: | | ||
conda activate build-env-pypi | ||
python -m build | ||
twine upload -r testpypi -u __token__ -p ${{ inputs.token }} dist/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
name: Deploy mvesuvio nightly | ||
|
||
on: | ||
workflow_run: | ||
workflows: ["mvesuvio nightly build"] | ||
branches: [main] | ||
types: | ||
- completed | ||
on: push | ||
# workflow_run: | ||
# workflows: ["mvesuvio nightly build"] | ||
# branches: [main] | ||
# types: | ||
# - completed | ||
|
||
jobs: | ||
build_conda_and_upload: | ||
|
@@ -19,13 +19,14 @@ jobs: | |
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
ref: main | ||
ref: publish-nighly-pypi | ||
# ref: main | ||
|
||
- name: Check for changes since last build | ||
run: | | ||
echo "recentCommits=$(test -z $(git log --since="yesterday" -1 --format=%h) && echo false || echo true)" >> $GITHUB_ENV | ||
- name: Setup Miniconda | ||
if: ${{ env.recentCommits == 'true'}} | ||
# if: ${{ env.recentCommits == 'true'}} | ||
uses: conda-incubator/[email protected] | ||
with: | ||
miniforge-version: latest | ||
|
@@ -35,8 +36,14 @@ jobs: | |
auto-activate-base: false | ||
|
||
- name: Build mvesuvio nightly conda package | ||
if: ${{ env.recentCommits == 'true'}} | ||
uses: ./.github/actions/publish-package | ||
# if: ${{ env.recentCommits == 'true'}} | ||
uses: ./.github/actions/publish-conda-package | ||
with: | ||
label: nightly | ||
token: ${{ secrets.ANACONDA_API_TOKEN }} | ||
|
||
- name: Build mvesuvio nightly PyPI package | ||
# if: ${{ env.recentCommits == 'true'}} | ||
uses: ./.github/actions/publish-pypi-package | ||
with: | ||
token: ${{ secrets.PYPI_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
python: | ||
- 3.8 | ||
- 3.10 | ||
|
||
jacobi: | ||
- 0.4.2 #pinned until later versions are proven. | ||
|
||
mantid: | ||
- '>=6.7' #pinned until upgrade to python 3.10. | ||
- '>=6.7' #pinned until upgrade to python 3.10. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters