update build.yml #19
Workflow file for this run
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: | ||
push: | ||
tags: | ||
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 | ||
jobs: | ||
createrelease: | ||
name: Create Release | ||
runs-on: ubuntu-latest | ||
outputs: | ||
release_url: ${{ steps.create-release.outputs.upload_url }} | ||
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 | ||
build: | ||
name: Build packages | ||
needs: createrelease | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
include: | ||
- os: ubuntu-latest | ||
TARGET: linux | ||
CMD_BUILD: > | ||
pyinstaller --clean -F --hidden-import audible_cli -n audible -c pyi_entrypoint.py && | ||
cd dist/ && | ||
zip -r9 audible_linux_ubuntu_latest audible | ||
OUT_FILE_NAME: audible_linux_ubuntu_latest.zip | ||
ASSET_MIME: application/zip # application/octet-stream | ||
- os: ubuntu-20.04 | ||
TARGET: linux | ||
CMD_BUILD: > | ||
pyinstaller --clean -F --hidden-import audible_cli -n audible -c pyi_entrypoint.py && | ||
cd dist/ && | ||
zip -r9 audible_linux_ubuntu_20_04 audible | ||
OUT_FILE_NAME: audible_linux_ubuntu_20_04.zip | ||
ASSET_MIME: application/zip # application/octet-stream | ||
- os: macos-latest | ||
TARGET: macos | ||
CMD_BUILD: > | ||
pyinstaller --clean -F --hidden-import audible_cli -n audible -c pyi_entrypoint.py && | ||
cd dist/ && | ||
zip -r9 audible_mac audible | ||
OUT_FILE_NAME: audible_mac.zip | ||
ASSET_MIME: application/zip | ||
- os: macos-latest | ||
TARGET: macos | ||
CMD_BUILD: > | ||
pyinstaller --clean -D --hidden-import audible_cli -n audible -c pyi_entrypoint.py && | ||
cd dist/ && | ||
zip -r9 audible_mac_dir audible | ||
OUT_FILE_NAME: audible_mac_dir.zip | ||
ASSET_MIME: application/zip | ||
- os: windows-latest | ||
TARGET: windows | ||
CMD_BUILD: > | ||
pyinstaller --clean -D --hidden-import audible_cli -n audible -c pyi_entrypoint.py && | ||
cd dist/ && | ||
powershell Compress-Archive audible audible_win_dir.zip | ||
OUT_FILE_NAME: audible_win_dir.zip | ||
ASSET_MIME: application/zip | ||
- os: windows-latest | ||
TARGET: windows | ||
CMD_BUILD: > | ||
pyinstaller --clean -F --hidden-import audible_cli -n audible -c pyi_entrypoint.py && | ||
cd dist/ && | ||
powershell Compress-Archive audible.exe audible_win.zip | ||
OUT_FILE_NAME: audible_win.zip | ||
ASSET_MIME: application/zip | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python 3.11 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.11 | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip .[pyi] && pip list | ||
- name: Build with pyinstaller for ${{matrix.TARGET}} | ||
run: ${{matrix.CMD_BUILD}} | ||
- name: Upload Release Asset | ||
id: upload-release-asset | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
RELEASE_URL: ${{ needs.createrelease.outputs.release_url }} | ||
with: | ||
upload_url: ${{ RELEASE_URL }} | ||
Check failure on line 100 in .github/workflows/build.yml GitHub Actions / BuildInvalid workflow file
|
||
asset_path: ./dist/${{ matrix.OUT_FILE_NAME}} | ||
asset_name: ${{ matrix.OUT_FILE_NAME}} | ||
asset_content_type: ${{ matrix.ASSET_MIME}} |