Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
python-poetry
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
python-poetry
Commits
c05948a7
Unverified
Commit
c05948a7
authored
Nov 18, 2019
by
Sébastien Eustace
Committed by
GitHub
Nov 18, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Automate release (#1595)
parent
90d17964
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
241 additions
and
1 deletions
+241
-1
.github/workflows/release.yml
+237
-0
Makefile
+1
-1
sonnet
+3
-0
No files found.
.github/workflows/release.yml
0 → 100644
View file @
c05948a7
name
:
Release
on
:
push
:
tags
:
-
'
*.*.*'
jobs
:
Linux
:
runs-on
:
ubuntu-latest
steps
:
-
uses
:
actions/checkout@v1
-
name
:
Building release
run
:
|
make linux_release
-
name
:
Upload release file
uses
:
actions/upload-artifact@v1
with
:
name
:
poetry-${{ github.ref }}-linux.tar.gz
path
:
releases/poetry-${{ github.ref }}-linux.tar.gz
-
name
:
Upload checksum file
uses
:
actions/upload-artifact@v1
with
:
name
:
poetry-${{ github.ref }}-linux.sha256sum
path
:
releases/poetry-${{ github.ref }}-linux.sha256sum
MacOS
:
runs-on
:
macos-latest
steps
:
-
uses
:
actions/checkout@v1
-
name
:
Set up Python 3.8
uses
:
actions/setup-python@v1
with
:
python-version
:
"
3.8"
-
name
:
Install Poetry
run
:
|
python get-poetry.py --preview -y
source $HOME/.poetry/env
-
name
:
Install dependencies
run
:
|
source $HOME/.poetry/env
poetry install --no-dev
-
name
:
Preparing Python executables
run
:
|
curl -L https://github.com/sdispater/python-binaries/releases/download/2.7.17/python-2.7.17.macos.tar.xz -o python-2.7.17.tar.xz
curl -L https://github.com/sdispater/python-binaries/releases/download/3.4.10/python-3.4.10.macos.tar.xz -o python-3.4.10.tar.xz
curl -L https://github.com/sdispater/python-binaries/releases/download/3.5.9/python-3.5.9.macos.tar.xz -o python-3.5.9.tar.xz
curl -L https://github.com/sdispater/python-binaries/releases/download/3.6.8/python-3.6.8.macos.tar.xz -o python-3.6.8.tar.xz
curl -L https://github.com/sdispater/python-binaries/releases/download/3.7.5/python-3.7.5.macos.tar.xz -o python-3.7.5.tar.xz
curl -L https://github.com/sdispater/python-binaries/releases/download/3.8.0/python-3.8.0.macos.tar.xz -o python-3.8.0.tar.xz
tar -zxf python-2.7.17.tar.xz
tar -zxf python-3.4.10.tar.xz
tar -zxf python-3.5.9.tar.xz
tar -zxf python-3.6.8.tar.xz
tar -zxf python-3.7.5.tar.xz
tar -zxf python-3.8.0.tar.xz
-
name
:
Build specific release
run
:
|
poetry run python sonnet make release --ansi -P "2.7:python-2.7.17/bin/python" -P "3.4:python-3.4.10/bin/python" -P "3.5:python-3.5.9/bin/python" -P "3.6:python-3.6.8/bin/python" -P "3.7:python-3.7.5/bin/python" -P "3.8:python-3.8.0/bin/python"
-
name
:
Upload release file
uses
:
actions/upload-artifact@v1
with
:
name
:
poetry-${{ github.ref }}-darwin.tar.gz
path
:
releases/poetry-${{ github.ref }}-darwin.tar.gz
-
name
:
Upload checksum file
uses
:
actions/upload-artifact@v1
with
:
name
:
poetry-${{ github.ref }}-darwin.sha256sum
path
:
releases/poetry-${{ github.ref }}-darwin.sha256sum
Windows
:
runs-on
:
windows-latest
steps
:
-
uses
:
actions/checkout@v1
-
name
:
Set up Python 3.8
uses
:
actions/setup-python@v1
with
:
python-version
:
"
3.8"
-
name
:
Install Poetry
run
:
|
python get-poetry.py --preview -y
$env:Path += ";$env:Userprofile\.poetry\bin"
-
name
:
Install dependencies
run
:
|
$env:Path += ";$env:Userprofile\.poetry\bin"
poetry install --no-dev
-
name
:
Preparing Python executables
run
:
|
Invoke-WebRequest https://github.com/sdispater/python-binaries/releases/download/2.7.17/python-2.7.17.windows.tar.xz -O python-2.7.17.tar.xz
Invoke-WebRequest https://github.com/sdispater/python-binaries/releases/download/3.4.4/python-3.4.4.windows.tar.xz -O python-3.4.4.tar.xz
Invoke-WebRequest https://github.com/sdispater/python-binaries/releases/download/3.5.4/python-3.5.4.windows.tar.xz -O python-3.5.4.tar.xz
Invoke-WebRequest https://github.com/sdispater/python-binaries/releases/download/3.6.8/python-3.6.8.windows.tar.xz -O python-3.6.8.tar.xz
Invoke-WebRequest https://github.com/sdispater/python-binaries/releases/download/3.7.5/python-3.7.5.windows.tar.xz -O python-3.7.5.tar.xz
Invoke-WebRequest https://github.com/sdispater/python-binaries/releases/download/3.8.0/python-3.8.0.windows.tar.xz -O python-3.8.0.tar.xz
7z x python-2.7.17.tar.xz
7z x python-3.4.4.tar.xz
7z x python-3.5.4.tar.xz
7z x python-3.6.8.tar.xz
7z x python-3.7.5.tar.xz
7z x python-3.8.0.tar.xz
7z x python-2.7.17.tar
7z x python-3.4.4.tar
7z x python-3.5.4.tar
7z x python-3.6.8.tar
7z x python-3.7.5.tar
7z x python-3.8.0.tar
-
name
:
Build specific release
run
:
|
poetry run python sonnet make release --ansi -P "2.7:python-2.7.17\python.exe" -P "3.4:python-3.4.4\python.exe" -P "3.5:python-3.5.4\python.exe" -P "3.6:python-3.6.8\python.exe" -P "3.7:python-3.7.5\python.exe" -P "3.8:python-3.8.0\python.exe"
-
name
:
Upload release file
uses
:
actions/upload-artifact@v1
with
:
name
:
poetry-${{ github.ref }}-win32.tar.gz
path
:
releases/poetry-${{ github.ref }}-win32.tar.gz
-
name
:
Upload checksum file
uses
:
actions/upload-artifact@v1
with
:
name
:
poetry-${{ github.ref }}-win32.sha256sum
path
:
releases/poetry-${{ github.ref }}-win32.sha256sum
Create Release
:
needs
:
[
Linux
,
MacOS
,
Windows
]
runs-on
:
ubuntu-latest
steps
:
-
name
:
Checkout code
uses
:
actions/checkout@master
-
name
:
Download Linux release file
uses
:
actions/download-artifact@master
with
:
name
:
poetry-${{ github.ref }}-linux.tar.gz
-
name
:
Download Linux checksum file
uses
:
actions/download-artifact@master
with
:
name
:
poetry-${{ github.ref }}-linux.sha256sum
-
name
:
Download MacOS release file
uses
:
actions/download-artifact@master
with
:
name
:
poetry-${{ github.ref }}-darwin.tar.gz
-
name
:
Download MacOS checksum file
uses
:
actions/download-artifact@master
with
:
name
:
poetry-${{ github.ref }}-darwin.sha256sum
-
name
:
Download Windows release file
uses
:
actions/download-artifact@master
with
:
name
:
poetry-${{ github.ref }}-win32.tar.gz
-
name
:
Download Windows checksum file
uses
:
actions/download-artifact@master
with
:
name
:
poetry-${{ github.ref }}-win32.sha256sum
-
name
:
Create Release
id
:
create_release
uses
:
actions/create-release@v1
env
:
GITHUB_TOKEN
:
${{ secrets.GITHUB_TOKEN }}
with
:
tag_name
:
${{ github.ref }}
release_name
:
${{ github.ref }}
draft
:
false
prerelease
:
false
-
name
:
Upload Linux release file asset
id
:
upload-release-asset
uses
:
actions/upload-release-asset@v1.0.1
env
:
GITHUB_TOKEN
:
${{ secrets.GITHUB_TOKEN }}
with
:
upload_url
:
${{ steps.create_release.outputs.upload_url }}
asset_name
:
poetry-${{ github.ref }}-linux.tar.gz
asset_content_type
:
application/gzip
-
name
:
Upload Linux checksum file asset
id
:
upload-release-asset
uses
:
actions/upload-release-asset@v1.0.1
env
:
GITHUB_TOKEN
:
${{ secrets.GITHUB_TOKEN }}
with
:
upload_url
:
${{ steps.create_release.outputs.upload_url }}
asset_name
:
poetry-${{ github.ref }}-linux.sha256sum
asset_content_type
:
text/pain
-
name
:
Upload MacOS release file asset
id
:
upload-release-asset
uses
:
actions/upload-release-asset@v1.0.1
env
:
GITHUB_TOKEN
:
${{ secrets.GITHUB_TOKEN }}
with
:
upload_url
:
${{ steps.create_release.outputs.upload_url }}
asset_name
:
poetry-${{ github.ref }}-darwin.tar.gz
asset_content_type
:
application/gzip
-
name
:
Upload MacOS checksum file asset
id
:
upload-release-asset
uses
:
actions/upload-release-asset@v1.0.1
env
:
GITHUB_TOKEN
:
${{ secrets.GITHUB_TOKEN }}
with
:
upload_url
:
${{ steps.create_release.outputs.upload_url }}
asset_name
:
poetry-${{ github.ref }}-darwin.sha256sum
asset_content_type
:
text/pain
-
name
:
Upload Windows release file asset
id
:
upload-release-asset
uses
:
actions/upload-release-asset@v1.0.1
env
:
GITHUB_TOKEN
:
${{ secrets.GITHUB_TOKEN }}
with
:
upload_url
:
${{ steps.create_release.outputs.upload_url }}
asset_name
:
poetry-${{ github.ref }}-win32.tar.gz
asset_content_type
:
application/gzip
-
name
:
Upload Windows checksum file asset
id
:
upload-release-asset
uses
:
actions/upload-release-asset@v1.0.1
env
:
GITHUB_TOKEN
:
${{ secrets.GITHUB_TOKEN }}
with
:
upload_url
:
${{ steps.create_release.outputs.upload_url }}
asset_name
:
poetry-${{ github.ref }}-win32.sha256sum
asset_content_type
:
text/pain
-
name
:
Install Poetry
run
:
|
python get-poetry.py --preview -y
$env:Path += ";$env:Userprofile\.poetry\bin"
-
name
:
Install dependencies
run
:
|
source $HOME/.poetry/env
poetry install --no-dev
-
name
:
Build project for distribution
run
:
|
source $HOME/.poetry/env
poetry run poetry build
-
name
:
Publish to PyPI
env
:
POETRY_PYPI_TOKEN_PYPI
:
${{ secrets.PYPI_TOKEN }}
run
:
|
source $HOME/.poetry/env
poetry run poetry publish
Makefile
View file @
c05948a7
...
@@ -48,7 +48,7 @@ wheel:
...
@@ -48,7 +48,7 @@ wheel:
linux_release
:
linux_release
:
docker pull quay.io/pypa/manylinux2010_x86_64
docker pull quay.io/pypa/manylinux2010_x86_64
docker run
--rm
-
t
-
i
-v
`
pwd
`
:/io quay.io/pypa/manylinux2010_x86_64 /io/make-linux-release.sh
docker run
--rm
-i
-v
`
pwd
`
:/io quay.io/pypa/manylinux2010_x86_64 /io/make-linux-release.sh
# run tests against all supported python versions
# run tests against all supported python versions
tox
:
tox
:
...
...
sonnet
View file @
c05948a7
...
@@ -219,6 +219,9 @@ class MakeReleaseCommand(Command):
...
@@ -219,6 +219,9 @@ class MakeReleaseCommand(Command):
subprocess
.
check_output
(
subprocess
.
check_output
(
[
python
,
"-V"
],
stderr
=
subprocess
.
STDOUT
,
shell
=
WINDOWS
[
python
,
"-V"
],
stderr
=
subprocess
.
STDOUT
,
shell
=
WINDOWS
)
)
if
version
==
"3.4"
and
WINDOWS
:
continue
subprocess
.
check_output
([
python
,
"-m"
,
"pip"
,
"install"
,
"pip"
,
"-U"
])
subprocess
.
check_output
([
python
,
"-m"
,
"pip"
,
"install"
,
"pip"
,
"-U"
])
except
subprocess
.
CalledProcessError
:
except
subprocess
.
CalledProcessError
:
raise
RuntimeError
(
"Python {} is not available"
.
format
(
version
))
raise
RuntimeError
(
"Python {} is not available"
.
format
(
version
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment