diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..f627562 --- /dev/null +++ b/.github/workflows/build.yml @@ -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 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d64f3fe..36dfbd5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 }} @@ -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: diff --git a/README.md b/README.md index a75755f..2ecc477 100644 --- a/README.md +++ b/README.md @@ -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.

- 📦 Download latest release 📦 + 📦⇩ Download latest release ⇩📦

## Run @@ -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)