generated from nipype/pydra-tasks-template
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29 from ghisvail/ci/publish-workflow
[CI] Add workflow to publish on release
- Loading branch information
Showing
3 changed files
with
117 additions
and
83 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# EditorConfig <editorconfig.org> | ||
|
||
# This is the top-most EditorConfig file. | ||
root = true | ||
|
||
# Use Unix-style newlines with a newline ending for all files. | ||
[*] | ||
end_of_line = lf | ||
insert_final_newline = true | ||
|
||
# Use 4-space indentation for Python. | ||
[*.py] | ||
indent_size = 4 | ||
indent_style = space | ||
|
||
# Use 2-space indentation for YAML. | ||
[*.{yml,yaml}] | ||
indent_size = 2 | ||
indent_style = space |
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,32 @@ | ||
name: publish | ||
|
||
on: | ||
# Trigger this workflow when a release is created. | ||
release: | ||
types: | ||
- published | ||
|
||
permission: | ||
# Allow checkout of the project. | ||
contents: read | ||
|
||
env: | ||
# Default Python version on which jobs are run. | ||
DEFAULT_PYTHON_VERSION: '3.9' | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ env.DEFAULT_PYTHON_VERSION }} | ||
- name: Install build frontend | ||
run: python -m pip install build | ||
- name: Build distribution package | ||
run: python -m build | ||
- name: Publish to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
password: ${{ secrets.PYPI_API_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