Skip to content

Commit

Permalink
Automated the releasing of all build artifacts on Github
Browse files Browse the repository at this point in the history
Release on GH test

GH tags

Use poetry version as release tag

env

env

env

Added executable build step

Trigger

Moved artifact release to pushes to main (i.e. release)
  • Loading branch information
jaspersiebring committed Aug 11, 2023
1 parent 9628550 commit 3311b82
Show file tree
Hide file tree
Showing 6 changed files with 56 additions and 6 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ jobs:
- name: Installing Poetry environment
run: poetry install
- name: Setting tag to package version
run: |
echo "VERSION=$(poetry version | awk '{print $2}')" >> $GITHUB_ENV
- name: Running pytest
id: pytest
run: poetry run pytest -v
Expand All @@ -66,9 +69,21 @@ jobs:
id: build
run: poetry build
if: steps.pytest.outcome == 'success' && steps.mypy.outcome == 'success' && steps.pylint.outcome == 'success' && steps.coverage.outcome == 'success'

- name: Authorize GitHub Actions to publish on PYPI
run: poetry config pypi-token.pypi ${{ secrets.PYPI_API_TOKEN }}
if: steps.build.outcome == 'success' && github.event_name == 'push'
- name: Publish on PYPI
run: poetry publish
if: steps.build.outcome == 'success' && github.event_name == 'push'
- name: Make executable from wheel
run: poetry run pyinstaller ./build.spec
id: freeze
if: steps.build.outcome == 'success' && github.event_name == 'push'
- name: Publish on Github
uses: softprops/action-gh-release@v1
with:
files: dist/*
tag_name: ${{ env.VERSION }}
prerelease: false
if: steps.build.outcome == 'success' && github.event_name == 'push' && steps.freeze.outcome == 'success'
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ MANIFEST
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,5 +91,5 @@ If `libretro_finder` is called without any additional arguments, LibretroFinder


### Missing features? Have some feedback? Let me know!
- [Open a Github issue](https://github.com/jaspersiebring)
- [Open a Github issue](https://github.com/jaspersiebring/libretro_finder/issues)
- [Message me on Reddit ](https://www.reddit.com/user/qtieb/)
36 changes: 36 additions & 0 deletions build.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# -*- mode: python ; coding: utf-8 -*-

import gooey
gooey_root = os.path.dirname(gooey.__file__)

block_cipher = None

a = Analysis(['./libretro_finder/main.py'],
pathex=['./libretro_finder/main.py'],
binaries=[],
datas=[('./config', 'config')],
hiddenimports=[],
hookspath=[],
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False)
pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)
exe = EXE(pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
[],
name='libretro_finder',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
upx_exclude=[],
runtime_tmpdir=None,
console=False,
icon=os.path.join(gooey_root, 'images', 'program_icon.ico'))
6 changes: 3 additions & 3 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: bscraper
channels:
- defaults
- conda-forge
dependencies:
- python=3.11
- poetry=1.4
- python=3.8
- poetry>=1.5
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "libretro-finder"
version = "0.2.2"
version = "0.2.3"
description = "Simple tool that finds and prepares your BIOS files for usage with Libretro (or its RetroArch frontend)."
authors = ["Jasper Siebring <j.siebring92@gmail.com>"]
license = "GNU General Public License v3.0"
Expand Down

0 comments on commit 3311b82

Please sign in to comment.