Only publish when tagging

This commit is contained in:
mio
2024-09-26 18:13:43 +08:00
parent 8bd254c6f5
commit 869968a96f
4 changed files with 40 additions and 20 deletions

View File

@@ -428,14 +428,13 @@ jobs:
with:
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
if: startsWith(github.ref, 'refs/tags')
working-directory: bindings/dotnet/UnicornEngine
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
if: startsWith(github.ref, 'refs/tags')
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
env:

View File

@@ -34,6 +34,12 @@ jobs:
python-ver: '3.8',
name: 'win32'
}
- {
os: ubuntu-latest,
arch: x64,
python-ver: '3.8',
name: 'musllinux'
}
- {
os: ubuntu-latest,
arch: x64,
@@ -129,6 +135,8 @@ jobs:
docker run --rm -v `pwd`/:/work dockcross/manylinux2014-x64 > ./dockcross
chmod +x ./dockcross
./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
cd bindings/python && python setup.py sdist
else