Skip to content

.github/workflows/pyinstaller.yml #4

.github/workflows/pyinstaller.yml

.github/workflows/pyinstaller.yml #4

Workflow file for this run

on:
release:
types: [published]
workflow_dispatch:
jobs:
build:
strategy:
matrix:
os: [windows-latest, macos-latest, ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: install dependencies and Pyinstaller
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pyinstaller
- name: build the executable file
run: |
pyinstaller --noconsole --onefile ./pyJSON.py
- name: create artifacts
uses: actions/upload-artifact@v4
with:
name: pyJSON-${{ matrix.os }}
path: ./dist/*
- name: pack data for release
if: github.event_name == "release"

Check failure on line 37 in .github/workflows/pyinstaller.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/pyinstaller.yml

Invalid workflow file

The workflow is not valid. .github/workflows/pyinstaller.yml (Line: 37, Col: 13): Unexpected symbol: '"release"'. Located at position 22 within expression: github.event_name == "release" .github/workflows/pyinstaller.yml (Line: 44, Col: 13): Unexpected symbol: '"release"'. Located at position 22 within expression: github.event_name == "release"
run: |
tag=$(git describe --tags --abbrev=0)
release_name="pyJSON-$tag-${{ matrix.os }}"
7z a -tzip "${release_name}.zip" "./dist/*"
- name: add to release
if: github.event_name == "release"
uses: softprops/action-gh-release@v2
with:
files: pyJSON-*.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}