Skip to content

Commit

Permalink
build: add packaging workflow for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
u8slvn committed Aug 26, 2024
1 parent efc0a2a commit 5b0551b
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 8 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: build
on:
push:
tags:
- "v*.*.*"
jobs:
build-windows:
name: build-${{ matrix.platform }}
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
platform: [ win32, win64 ]
include:
- platform: win32
arch: x86
- platform: win64
arch: x64
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v4

- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: 3.12
architecture: ${{ matrix.arch }}

- name: Install poetry
run: curl -sSL https://install.python-poetry.org | python - -y

- name: Update poetry path
run: echo "$HOME/.local/bin" >> $GITHUB_PATH

- name: Configure poetry
run: poetry config virtualenvs.in-project true

- name: Install dependencies
run: poetry install

- name: Build release
run: |
poetry run python scripts/build.py --os ${{ matrix.platform }}
- name: Archive production artifacts
uses: actions/upload-artifact@v4
with:
name: windows
path: ${{ github.workspace }}/dist/doggo-*.exe

# - name: Publish release
# uses: softprops/action-gh-release@v2
# if: startsWith(github.ref, 'refs/tags/')
# with:
# files: dist/doggo-*.exe
12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,22 @@ jobs:
os: [ Ubuntu, macOS, Windows ]
include:
- os: Ubuntu
image: ubuntu-22.04
image: ubuntu-latest
- os: Windows
image: windows-2022
image: windows-latest
- os: macOS
image: macos-12
image: macos-latest
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Setup headless display
uses: pyvista/setup-headless-display-action@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -59,8 +59,8 @@ jobs:
- name: Check tests
run: |
poetry run mypy
poetry run pytest tests/ --cov=src
poetry run mypy
- name: Publish coverage
env:
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Here is a list of the dog states: *idle*, *idle and bark*, *walk*, *walk and bar
**Project context**: A colleague of mine wanted to have a dog, but he couldn't because of lots of reasons. So I decided to make him a virtual dog and it was the opportunity for me to play with Markov chains.

<p align="center">
<a href="https://github.com/u8slvn/doggo/releases">📦 Download latest release 📦</a>
📦<a href="https://github.com/u8slvn/doggo/releases"> Download latest release </a>📦
</p>

## Run
Expand Down Expand Up @@ -60,4 +60,4 @@ For now, only one biome (mountain) is available. The feature to pick a biome ran
* Code source under [GPL-3.0 License](https://www.gnu.org/licenses/gpl-3.0.en.html)
* Assets:
* All assets under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)
* Excepting dog sprites in `src/doggo/assets/dogs` by [Benvictus](https://benvictus.itch.io/pixel-dogs)
* Excepting dog sprites in `src/doggo/assets/dogs` from **Pixel Dogs** by [Benvictus](https://benvictus.itch.io/pixel-dogs)

0 comments on commit 5b0551b

Please sign in to comment.