Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
MUYSC
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jorge Alfredo Jaimes Teherán
MUYSC
Commits
d162650e
Unverified
Commit
d162650e
authored
2 years ago
by
Chris Holdgraf
Committed by
GitHub
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
MAINT: Move pypi publish to dedicated workflow (#1878)
parent
795c4b5c
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.github/workflows/publish.yml
+32
-0
32 additions, 0 deletions
.github/workflows/publish.yml
.github/workflows/tests.yml
+1
-24
1 addition, 24 deletions
.github/workflows/tests.yml
with
33 additions
and
24 deletions
.github/workflows/publish.yml
0 → 100644
+
32
−
0
View file @
d162650e
# This will run every time a tag is created and pushed to the repository.
# It calls our tests workflow via a `workflow_call`, and if tests pass
# then it triggers our upload to PyPI for a new release.
name
:
Publish to PyPI
on
:
release
:
types
:
[
"
published"
]
jobs
:
tests
:
uses
:
./.github/workflows/tests.yml
publish
:
name
:
publish
needs
:
[
tests
]
# require tests to pass before deploy runs
runs-on
:
ubuntu-latest
steps
:
-
name
:
Checkout source
uses
:
actions/checkout@v3
-
name
:
Set up Python
3.9
uses
:
actions/setup-python@v4
with
:
python-version
:
3.9
-
name
:
Install flit
run
:
|
pip install flit~=3.6
-
name
:
Build and publish
run
:
|
flit publish
env
:
FLIT_USERNAME
:
__token__
FLIT_PASSWORD
:
${{ secrets.PYPI_KEY }}
This diff is collapsed.
Click to expand it.
.github/workflows/tests.yml
+
1
−
24
View file @
d162650e
...
@@ -6,6 +6,7 @@ on:
...
@@ -6,6 +6,7 @@ on:
tags
:
tags
:
-
'
v*'
-
'
v*'
pull_request
:
pull_request
:
workflow_call
:
env
:
env
:
# Force colors for logs
# Force colors for logs
...
@@ -109,27 +110,3 @@ jobs:
...
@@ -109,27 +110,3 @@ jobs:
-
name
:
Run pytest
-
name
:
Run pytest
run
:
pytest --durations=10 -m 'not requires_tex'
run
:
pytest --durations=10 -m 'not requires_tex'
publish
:
name
:
Publish to PyPi
needs
:
[
pre-commit
,
test-with-cov
,
tests
]
if
:
github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
runs-on
:
ubuntu-latest
steps
:
-
name
:
Checkout source
uses
:
actions/checkout@v3
-
name
:
Set up Python
3.9
uses
:
actions/setup-python@v4
with
:
python-version
:
3.9
-
name
:
Install flit
run
:
|
pip install flit~=3.6
-
name
:
Build and publish
run
:
|
flit publish
env
:
FLIT_USERNAME
:
__token__
FLIT_PASSWORD
:
${{ secrets.PYPI_KEY }}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment