fix up rotation and cropping #67
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 | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- 'master' | |
tags: | |
- '*' | |
jobs: | |
pre-release: | |
name: "Pre Release" | |
runs-on: "ubuntu-latest" | |
steps: | |
- uses: "marvinpinto/action-automatic-releases@latest" | |
with: | |
repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
automatic_release_tag: "latest" | |
prerelease: true | |
title: "Development Build" | |
# files: | | |
# LICENSE.txt | |
# *.jar | |
# createrelease: | |
# name: Create Release | |
# runs-on: [ubuntu-latest] | |
# steps: | |
# - name: Create Release | |
# id: create_release | |
# uses: actions/create-release@v1 | |
# env: | |
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# with: | |
# tag_name: ${{ github.ref }} | |
# release_name: Release ${{ github.ref }} | |
# draft: false | |
# prerelease: false | |
# - name: Output Release URL File | |
# run: echo "${{ steps.create_release.outputs.upload_url }}" > release_url.txt | |
# - name: Save Release URL File for publish | |
# uses: actions/upload-artifact@v1 | |
# with: | |
# name: release_url | |
# path: release_url.txt | |
build: | |
name: Build packages | |
# needs: createrelease | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
include: | |
- os: macos-13-xlarge | |
TARGET: macos | |
CMD_BUILD: > | |
pyinstaller -i icon.icns -w -n LinearStitch LS_GUI.py && | |
cd dist/ && | |
zip -r9 LinearStitchMac LinearStitch.app/ | |
OUT_FILE_NAME: LinearStitchMac.zip | |
ASSET_MIME: application/zip | |
- os: windows-latest | |
ARCH: x64 | |
TARGET: windows | |
CMD_BUILD: > | |
pyinstaller -i icon.icns --add-data 'zereneTemplate.xml;.' -w -n LinearStitch LS_GUI.py && | |
cd dist/ && | |
7z a LinearStitchWindows.zip -r * | |
OUT_FILE_NAME: LinearStitchWindows.zip | |
ASSET_MIME: application/vnd.microsoft.portable-executable | |
steps: | |
- run: echo "HELLO" | |
- run: echo ${GITHUB_REPOSITORY} | |
- uses: actions/checkout@v1 | |
- name: Set up Python 3.11 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.11 | |
- name: Set up Homebrew | |
id: set-up-homebrew | |
uses: Homebrew/actions/setup-homebrew@master | |
if: matrix.TARGET == 'macos' | |
- name: Install Homebrew Bundler RubyGems | |
if: matrix.TARGET == 'macos' | |
run: brew install libvips | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Build with pyinstaller for ${{matrix.TARGET}} | |
run: ${{matrix.CMD_BUILD}} | |
- name: Upload | |
uses: actions/upload-artifact@v2 | |
with: | |
path: dist/${{matrix.OUT_FILE_NAME}} | |
name: LinearStitch ${{ matrix.os }} binary | |
release: | |
needs: [build] | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Download | |
uses: actions/download-artifact@v3 | |
- name: List artifacts | |
run: | | |
find | |
- name: Upload to latest release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
if: github.ref == 'refs/heads/master' | |
run: | | |
gh api repos/${GITHUB_REPOSITORY}/releases/tags/latest | jq -r '.assets[] | [.url] | @tsv' | xargs -n 1 gh api -X DELETE || true | |
gh release upload --repo ${GITHUB_REPOSITORY} --clobber latest "LinearStitch windows-latest binary/LinearStitchWindows.zip" | |
gh release upload --repo ${GITHUB_REPOSITORY} --clobber latest "LinearStitch macos-13-xlarge binary/LinearStitchMac.zip" |