spellgen 0.4.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,36 @@
1
+ name: Build and Test
2
+
3
+ on:
4
+ push:
5
+ branches: [ main ]
6
+ pull_request:
7
+ branches: [ main ]
8
+
9
+ jobs:
10
+ build:
11
+ runs-on: ubuntu-latest
12
+
13
+ steps:
14
+ - uses: actions/checkout@v4
15
+ with:
16
+ fetch-depth: 0 # Fetch all history for proper version detection
17
+
18
+ - name: Set up Python
19
+ uses: actions/setup-python@v5
20
+ with:
21
+ python-version: '3.11'
22
+
23
+ - name: Set up Rust
24
+ uses: dtolnay/rust-toolchain@stable
25
+
26
+ - name: Install Maturin
27
+ run: pip install maturin[patchelf]
28
+
29
+ - name: Build wheels
30
+ run: maturin build --release --out dist --strip
31
+
32
+ - name: Upload wheels
33
+ uses: actions/upload-artifact@v4
34
+ with:
35
+ name: wheels-ci
36
+ path: dist
@@ -0,0 +1,154 @@
1
+ name: Release and Publish
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - 'v*'
7
+ workflow_dispatch:
8
+ inputs:
9
+ tag:
10
+ description: Release tag to build and publish, for example v0.4.0
11
+ required: true
12
+ type: string
13
+
14
+ permissions:
15
+ contents: write
16
+
17
+ concurrency:
18
+ group: release-publish-${{ github.ref }}
19
+ cancel-in-progress: false
20
+
21
+ jobs:
22
+ validate:
23
+ runs-on: ubuntu-latest
24
+ outputs:
25
+ release_tag: ${{ steps.resolve.outputs.release_tag }}
26
+ release_ref: ${{ steps.resolve.outputs.release_ref }}
27
+
28
+ steps:
29
+ - name: Resolve release ref
30
+ id: resolve
31
+ shell: bash
32
+ run: |
33
+ set -euo pipefail
34
+ if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
35
+ TAG="${{ inputs.tag }}"
36
+ else
37
+ TAG="${{ github.ref_name }}"
38
+ fi
39
+
40
+ if [[ ! "$TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
41
+ echo "Release tag must match v<major>.<minor>.<patch>; got '$TAG'" >&2
42
+ exit 1
43
+ fi
44
+
45
+ echo "release_tag=$TAG" >> "$GITHUB_OUTPUT"
46
+ echo "release_ref=refs/tags/$TAG" >> "$GITHUB_OUTPUT"
47
+
48
+ build:
49
+ needs:
50
+ - validate
51
+ strategy:
52
+ matrix:
53
+ os: [ubuntu-latest, windows-latest]
54
+ runs-on: ${{ matrix.os }}
55
+
56
+ steps:
57
+ - uses: actions/checkout@v4
58
+ with:
59
+ ref: ${{ needs.validate.outputs.release_ref }}
60
+ fetch-depth: 0
61
+
62
+ - name: Set up Python
63
+ uses: actions/setup-python@v5
64
+ with:
65
+ python-version: '3.11'
66
+
67
+ - name: Set up Rust
68
+ uses: dtolnay/rust-toolchain@stable
69
+
70
+ - name: Install Maturin
71
+ shell: bash
72
+ run: |
73
+ if [ "$RUNNER_OS" = "Windows" ]; then
74
+ pip install maturin
75
+ else
76
+ pip install "maturin[patchelf]"
77
+ fi
78
+
79
+ - name: Build wheels
80
+ run: maturin build --release --out dist --strip -i python
81
+
82
+ - name: Build source distribution
83
+ if: runner.os == 'Linux'
84
+ run: maturin sdist --out dist
85
+
86
+ - name: Upload distribution artifacts
87
+ uses: actions/upload-artifact@v4
88
+ with:
89
+ name: dist-${{ matrix.os }}
90
+ path: dist/*
91
+
92
+ publish:
93
+ needs:
94
+ - validate
95
+ - build
96
+ runs-on: ubuntu-latest
97
+
98
+ steps:
99
+ - name: Download all distributions
100
+ uses: actions/download-artifact@v4
101
+ with:
102
+ path: dist
103
+ merge-multiple: true
104
+
105
+ - name: Publish to PyPI
106
+ uses: pypa/gh-action-pypi-publish@release/v1
107
+ with:
108
+ password: ${{ secrets.PYPI_API_TOKEN }}
109
+ packages-dir: dist
110
+
111
+ create_release:
112
+ needs:
113
+ - validate
114
+ - publish
115
+ runs-on: ubuntu-latest
116
+
117
+ steps:
118
+ - name: Download all distributions
119
+ uses: actions/download-artifact@v4
120
+ with:
121
+ path: dist
122
+ merge-multiple: true
123
+
124
+ - name: Create GitHub release
125
+ uses: softprops/action-gh-release@v2
126
+ with:
127
+ tag_name: ${{ needs.validate.outputs.release_tag }}
128
+ generate_release_notes: true
129
+ files: dist/*
130
+
131
+ notify_dependents:
132
+ needs:
133
+ - validate
134
+ - create_release
135
+ runs-on: ubuntu-latest
136
+
137
+ steps:
138
+ - name: Trigger wiz404_wasm_spell build
139
+ uses: peter-evans/repository-dispatch@v3
140
+ with:
141
+ token: ${{ secrets.WASM_BUILD_TRIGGER_TOKEN }}
142
+ repository: Spiral404/wiz404_wasm_spell
143
+ event-type: spellgen-released
144
+ client-payload: >-
145
+ {"tag":"${{ needs.validate.outputs.release_tag }}","source_repo":"${{ github.repository }}"}
146
+
147
+ - name: Trigger wizard404 build
148
+ uses: peter-evans/repository-dispatch@v3
149
+ with:
150
+ token: ${{ secrets.WIZARD404_BUILD_TRIGGER_TOKEN }}
151
+ repository: Spiral404/wizard404
152
+ event-type: spellgen-released
153
+ client-payload: >-
154
+ {"tag":"${{ needs.validate.outputs.release_tag }}","source_repo":"${{ github.repository }}"}
@@ -0,0 +1,13 @@
1
+ Cargo.lock
2
+ target/*
3
+ **.png
4
+ **.dds
5
+ **.webp
6
+ **.tga
7
+ **.jpg
8
+ **.xml
9
+ .vscode/*
10
+ !empty_spell_image.dds
11
+ venv/
12
+ dist/
13
+ .idea/spellgen.iml
@@ -0,0 +1,8 @@
1
+ # Default ignored files
2
+ /shelf/
3
+ /workspace.xml
4
+ # Editor-based HTTP Client requests
5
+ /httpRequests/
6
+ # Datasource local storage ignored files
7
+ /dataSources/
8
+ /dataSources.local.xml