Update skale.py #297
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
name: Build and publish | |
on: | |
pull_request: | |
types: [closed] | |
branches: | |
- master | |
- develop | |
- beta | |
- stable | |
push: | |
- test-build | |
jobs: | |
create_release: | |
if: github.event.pull_request.merged | |
name: Create release | |
runs-on: ubuntu-20.04 | |
outputs: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
version: ${{ steps.export_outputs.outputs.version }} | |
branch: ${{ steps.export_outputs.outputs.branch }} | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: true | |
- name: Set Versions | |
run: | | |
bash ./scripts/set_versions_ga.sh | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ env.VERSION }} | |
release_name: ${{ env.VERSION }} | |
draft: false | |
prerelease: true | |
- name: Export outputs | |
id: export_outputs | |
run: | | |
echo "::set-output name=version::$VERSION" | |
echo "::set-output name=branch::$BRANCH" | |
build_and_publish: | |
if: github.event.pull_request.merged | |
needs: create_release | |
name: Build and publish for ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
include: | |
# - os: ubuntu-20.04 | |
# asset_name: sk-val-${{ needs.create_release.outputs.version }}-Linux-x86_64 | |
- os: macos-latest | |
asset_name: sk-val-${{ needs.create_release.outputs.version }}-Darwin-x86_64 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python 3.11 | |
uses: actions/setup-python@v1 | |
with: | |
python-version: 3.11 | |
- name: Install ubuntu dependencies | |
if: matrix.os == 'ubuntu-20.04' | |
run: | | |
sudo apt-get update | |
sudo apt-get install libssl-dev | |
sudo apt-get install libudev-dev | |
sudo apt-get install libusb-1.0-0-dev | |
- name: Install macOS dependencies | |
if: matrix.os == 'macos-latest' | |
run: | | |
bash ./scripts/m2crypto_macos_fix.sh | |
python -m pip install --upgrade pip | |
pip install -e . | |
pip install -e .[dev] | |
pip install wheel | |
- name: Checkout submodules | |
run: git submodule update --init | |
- name: Build binary linux | |
if: matrix.os == 'ubuntu-20.04' | |
run: | | |
mkdir dist | |
docker build . -t builder | |
docker run -v /home/ubuntu/dist:/app/dist builder scripts/build.sh ${{ needs.create_release.outputs.version }} ${{ needs.create_release.outputs.branch }} | |
ls -altr /home/ubuntu/dist/ | |
docker rm -f $(docker ps -aq) | |
sudo sha512sum /home/ubuntu/dist/${{ matrix.asset_name }} | sudo tee > /dev/null /home/ubuntu/dist/sha512sum | |
- name: Build binary mac | |
if: matrix.os == 'macos-latest' | |
run: | | |
bash ./scripts/build.sh ${{ needs.create_release.outputs.version }} ${{ needs.create_release.outputs.branch }} | |
sudo shasum -a 512 ./dist/${{ matrix.asset_name }} | sudo tee > /dev/null ./dist/sha512sum | |
# - name: Upload Release Asset Ubuntu | |
# if: matrix.os == 'ubuntu-20.04' | |
# id: upload-release-asset-ubuntu | |
# uses: actions/upload-release-asset@v1 | |
# env: | |
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# with: | |
# upload_url: ${{ needs.create_release.outputs.upload_url }} | |
# asset_path: /home/ubuntu/dist/${{ matrix.asset_name }} | |
# asset_name: ${{ matrix.asset_name }} | |
# asset_content_type: application/octet-stream | |
# - name: Upload release checksum | |
# if: matrix.os == 'ubuntu-20.04' | |
# id: upload-release-checksum-ubuntu | |
# uses: actions/upload-release-asset@v1 | |
# env: | |
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# with: | |
# upload_url: ${{ needs.create_release.outputs.upload_url }} | |
# asset_path: /home/ubuntu/dist/sha512sum | |
# asset_name: ${{ matrix.asset_name }}.sha512 | |
# asset_content_type: text/plain | |
# - name: Upload Release Asset Mac | |
# if: matrix.os == 'macos-latest' | |
# id: upload-release-asset-mac | |
# uses: actions/upload-release-asset@v1 | |
# env: | |
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# with: | |
# upload_url: ${{ needs.create_release.outputs.upload_url }} | |
# asset_path: ./dist/${{ matrix.asset_name }} | |
# asset_name: ${{ matrix.asset_name }} | |
# asset_content_type: application/octet-stream | |
# - name: Upload release checksum | |
# if: matrix.os == 'macos-latest' | |
# id: upload-release-checksum-mac | |
# uses: actions/upload-release-asset@v1 | |
# env: | |
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# with: | |
# upload_url: ${{ needs.create_release.outputs.upload_url }} | |
# asset_path: ./dist/sha512sum | |
# asset_name: ${{ matrix.asset_name }}.sha512 | |
# asset_content_type: text/plain |