Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 0 additions & 74 deletions .github/workflows/codeql.yml

This file was deleted.

61 changes: 39 additions & 22 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
@@ -1,55 +1,72 @@
name: Package
name: Build

on:
push:
branches: [master]
pull_request:
branches: [master]
schedule:
- cron: '0 0 * * 0'

permissions:
contents: write

jobs:
package:
build:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v5

- name: Setup Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.10'
architecture: x64

- name: Cache Python packages
uses: actions/cache@v3
with:
path: |
~\AppData\Local\pip\Cache
~\AppData\Local\pypoetry
key: python-deps

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install --upgrade poetry
poetry install --sync --no-root
run: uv sync

- name: Cache Nuitka
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
~\AppData\Local\Nuitka
key: nuitka

- name: Build
run: |
poetry run nuitka --standalone --prefer-source-code --mingw64 --assume-yes-for-downloads --show-scons --output-dir=build --include-module=_cffi_backend src\snapjaw.py
uv run nuitka --standalone --prefer-source-code --mingw64 --assume-yes-for-downloads --show-scons --output-dir=build --include-module=_cffi_backend src\snapjaw.py
New-Item -ItemType directory -Name snapjaw\snapjaw -Path build
Get-Item -Path build\snapjaw.dist\* | Move-Item -Destination build\snapjaw\snapjaw

- name: Upload
- name: Package
run: Compress-Archive -Path build\snapjaw\* -DestinationPath snapjaw.zip

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: snapjaw
path: build\snapjaw\
path: snapjaw.zip

release:
needs: build
if: github.event_name == 'push'
runs-on: ubuntu-latest
steps:
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: snapjaw

- name: Get date
id: date
run: echo "date=$(date +%Y.%m.%d)" >> "$GITHUB_OUTPUT"

- name: Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.date.outputs.date }}.${{ github.run_number }}
name: ${{ steps.date.outputs.date }}.${{ github.run_number }}
files: snapjaw.zip
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
- Simple command line interface

## How to install
- [Download snapjaw](https://nightly.link/refaim/snapjaw/workflows/package/master/snapjaw.zip)
- [Download snapjaw](https://github.com/refaim/snapjaw/releases/latest)
- Extract the archive into the WoW folder. This will create a structure similar to `C:\Games\WoW\snapjaw\snapjaw.exe`. Alternatively, if you choose a different destination, you'll need to specify the path to the addons directory using the `--addons-dir` argument.
- See usage examples or run `snapjaw.exe --help`

Expand Down Expand Up @@ -71,4 +71,4 @@ snapjaw update ShaguTweaks

## Requirements for developers
- [Python 3.10](https://www.python.org)
- [poetry](https://python-poetry.org)
- [uv](https://docs.astral.sh/uv/)
Loading