Only publish when tagging
This commit is contained in:
3
.github/workflows/Nuget-publishing.yml
vendored
3
.github/workflows/Nuget-publishing.yml
vendored
@@ -428,14 +428,13 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
path: ${{ github.workspace }}/bindings/dotnet/UnicornEngine/bin/Release/UnicornEngine.Unicorn.*.nupkg
|
path: ${{ github.workspace }}/bindings/dotnet/UnicornEngine/bin/Release/UnicornEngine.Unicorn.*.nupkg
|
||||||
|
|
||||||
# We often exceed limit so just release on tags
|
|
||||||
- name: 📦 Publish to Github Packages
|
- name: 📦 Publish to Github Packages
|
||||||
if: startsWith(github.ref, 'refs/tags')
|
if: startsWith(github.ref, 'refs/tags')
|
||||||
working-directory: bindings/dotnet/UnicornEngine
|
working-directory: bindings/dotnet/UnicornEngine
|
||||||
run: dotnet nuget push "bin/Release/UnicornEngine.Unicorn.*.nupkg" --source "github" --api-key "${{ secrets.GHPR_TOKEN }}"
|
run: dotnet nuget push "bin/Release/UnicornEngine.Unicorn.*.nupkg" --source "github" --api-key "${{ secrets.GHPR_TOKEN }}"
|
||||||
|
|
||||||
# Nuget is more tolerate so let's release every commit
|
|
||||||
- name: 📦 Publish Nuget package
|
- name: 📦 Publish Nuget package
|
||||||
|
if: startsWith(github.ref, 'refs/tags')
|
||||||
working-directory: bindings/dotnet/UnicornEngine
|
working-directory: bindings/dotnet/UnicornEngine
|
||||||
run: dotnet nuget push "bin/Release/UnicornEngine.Unicorn.*.nupkg" -k "$NUGET_AUTH_TOKEN" -s https://api.nuget.org/v3/index.json
|
run: dotnet nuget push "bin/Release/UnicornEngine.Unicorn.*.nupkg" -k "$NUGET_AUTH_TOKEN" -s https://api.nuget.org/v3/index.json
|
||||||
env:
|
env:
|
||||||
|
|||||||
8
.github/workflows/PyPI-publishing.yml
vendored
8
.github/workflows/PyPI-publishing.yml
vendored
@@ -34,6 +34,12 @@ jobs:
|
|||||||
python-ver: '3.8',
|
python-ver: '3.8',
|
||||||
name: 'win32'
|
name: 'win32'
|
||||||
}
|
}
|
||||||
|
- {
|
||||||
|
os: ubuntu-latest,
|
||||||
|
arch: x64,
|
||||||
|
python-ver: '3.8',
|
||||||
|
name: 'musllinux'
|
||||||
|
}
|
||||||
- {
|
- {
|
||||||
os: ubuntu-latest,
|
os: ubuntu-latest,
|
||||||
arch: x64,
|
arch: x64,
|
||||||
@@ -129,6 +135,8 @@ jobs:
|
|||||||
docker run --rm -v `pwd`/:/work dockcross/manylinux2014-x64 > ./dockcross
|
docker run --rm -v `pwd`/:/work dockcross/manylinux2014-x64 > ./dockcross
|
||||||
chmod +x ./dockcross
|
chmod +x ./dockcross
|
||||||
./dockcross bindings/python/build_wheel.sh
|
./dockcross bindings/python/build_wheel.sh
|
||||||
|
elif [ ${{ matrix.config.name }} == 'musllinux' ]; then
|
||||||
|
docker run --rm -v `pwd`:/work -w /work python:3.7-alpine sh /work/bindings/python/musl_wheel.sh
|
||||||
elif [ ${{ matrix.config.name }} == 'sdist' ]; then
|
elif [ ${{ matrix.config.name }} == 'sdist' ]; then
|
||||||
cd bindings/python && python setup.py sdist
|
cd bindings/python && python setup.py sdist
|
||||||
else
|
else
|
||||||
|
|||||||
9
bindings/python/musl_wheel.sh
Normal file
9
bindings/python/musl_wheel.sh
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# TODO: use cibuildwheel
|
||||||
|
apk update
|
||||||
|
apk add gcc make cmake pkgconfig linux-headers git musl-dev patchelf
|
||||||
|
|
||||||
|
python3 -m pip install -U pip setuptools auditwheel
|
||||||
|
|
||||||
|
cd bindings/python && python3 setup.py bdist_wheel && auditwheel repair dist/*.whl && mv -f wheelhouse/*.whl .
|
||||||
@@ -180,24 +180,28 @@ cmdclass['build'] = custom_build
|
|||||||
cmdclass['sdist'] = custom_sdist
|
cmdclass['sdist'] = custom_sdist
|
||||||
cmdclass['bdist_egg'] = custom_bdist_egg
|
cmdclass['bdist_egg'] = custom_bdist_egg
|
||||||
|
|
||||||
# if 'bdist_wheel' in sys.argv and '--plat-name' not in sys.argv:
|
if 'bdist_wheel' in sys.argv and '--plat-name' not in sys.argv:
|
||||||
# idx = sys.argv.index('bdist_wheel') + 1
|
idx = sys.argv.index('bdist_wheel') + 1
|
||||||
# sys.argv.insert(idx, '--plat-name')
|
|
||||||
# name = get_platform()
|
name = get_platform()
|
||||||
# if 'linux' in name:
|
if 'linux' in name:
|
||||||
# # linux_* platform tags are disallowed because the python ecosystem is fubar
|
# linux_* platform tags are disallowed because the python ecosystem is fubar
|
||||||
# # linux builds should be built in the centos 5 vm for maximum compatibility
|
# linux builds should be built in the centos 5 vm for maximum compatibility
|
||||||
# # see https://github.com/pypa/manylinux
|
# see https://github.com/pypa/manylinux
|
||||||
# # see also https://github.com/angr/angr-dev/blob/master/bdist.sh
|
# see also https://github.com/angr/angr-dev/blob/master/bdist.sh
|
||||||
# sys.argv.insert(idx + 1, 'manylinux1_' + platform.machine())
|
# sys.argv.insert(idx + 1, 'manylinux1_' + platform.machine())
|
||||||
# elif 'mingw' in name:
|
# Let auditwheel repair it
|
||||||
# if IS_64BITS:
|
pass
|
||||||
# sys.argv.insert(idx + 1, 'win_amd64')
|
elif 'mingw' in name:
|
||||||
# else:
|
sys.argv.insert(idx, '--plat-name')
|
||||||
# sys.argv.insert(idx + 1, 'win32')
|
if IS_64BITS:
|
||||||
# else:
|
sys.argv.insert(idx + 1, 'win_amd64')
|
||||||
# # https://www.python.org/dev/peps/pep-0425/
|
else:
|
||||||
# sys.argv.insert(idx + 1, name.replace('.', '_').replace('-', '_'))
|
sys.argv.insert(idx + 1, 'win32')
|
||||||
|
else:
|
||||||
|
sys.argv.insert(idx, '--plat-name')
|
||||||
|
# https://www.python.org/dev/peps/pep-0425/
|
||||||
|
sys.argv.insert(idx + 1, name.replace('.', '_').replace('-', '_'))
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from setuptools.command.develop import develop
|
from setuptools.command.develop import develop
|
||||||
|
|||||||
Reference in New Issue
Block a user