Release from artifact
Mara-Li opened this issue · comments
Lisandra commented
Hello !
I try to release artifact from a python build but the actions doesn't release the good files.
My github action is :
name: Build
on:
push:
branches:
- main
defaults:
run:
shell: bash
jobs:
Build:
name: Build release binaries
strategy:
fail-fast: false
matrix:
os:
- windows-latest
- ubuntu-latest
- macos-latest
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.10.0
- name: Install Python dependencies Without MacOS
if: matrix.os != 'macos-latest'
run: |
python -m pip install --upgrade pip pyinstaller
pip install -r requirements.txt
- name: Build windows
if: matrix.os == 'windows-latest'
run: pyinstaller Obsidian_Snippeter/GUI.py --name "${{matrix.os}}-Manager" --windowed --i Obsidian_Snippeter/src/gui_bin/hand.ico --noconfirm --add-data 'Obsidian_Snippeter/src/gui_bin/*;Obsidian_Snippeter/src/gui_bin/' --distpath app
- name: Build Ubuntu
if: matrix.os == 'ubuntu-latest'
run: pyinstaller Obsidian_Snippeter/GUI.py --name "${{matrix.os}}-Manager" --windowed --i Obsidian_Snippeter/src/gui_bin/hand.ico --noconfirm --add-data 'Obsidian_Snippeter/src/gui_bin/*:Obsidian_Snippeter/src/gui_bin/' --distpath app
- name: Build MacOS
if: matrix.os == 'macos-latest'
run: |
brew install python-tk@3.9 && echo -n 'export PATH="/usr/local/opt/python/libexec/bin:$PATH"' >> ~/.zshrc && source ~/.zshrc && echo -n 'export PATH="/usr/local/opt/python/libexec/bin:$PATH"' >> ~/.bashrc && source ~/.bashrc
pip install pyinstaller
pip install -r requirements.txt
pyinstaller Obsidian_Snippeter/GUI.py --name "${{matrix.os}}-Manager" --windowed --i Obsidian_Snippeter/src/gui_bin/hand.ico --noconfirm --add-data 'Obsidian_Snippeter/src/gui_bin/*:Obsidian_Snippeter/src/gui_bin/' --distpath app
- name: Deploy artifacts
uses: actions/upload-artifact@v2
with:
name: app-${{ matrix.os }}
path: app/${{ matrix.os }}-Manager
if-no-files-found: error
- name: Create release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: app/${{matrix.os}}-Manager
asset_name: Obsidian_Snippet_Manager
tag: ${{ github.ref }}
body: "Release ${{ github.ref }}"
Anyone can help me ?