Skip to content

Commit eb45a36

Browse files
committed
Initial commit
0 parents  commit eb45a36

File tree

6 files changed

+513
-0
lines changed

6 files changed

+513
-0
lines changed
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Publish
2+
3+
on:
4+
push:
5+
workflow_dispatch:
6+
7+
jobs:
8+
build-and-release:
9+
if: "contains(github.event.head_commit.message, 'Version')"
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- name: Set up Python
14+
uses: actions/setup-python@v2
15+
with:
16+
python-version: '3.10'
17+
- name: Install dependencies
18+
run: |
19+
python -m pip install --upgrade pip
20+
python -m pip install --upgrade setuptools wheel build twine
21+
python -m pip install -e .
22+
- name: Build package
23+
run: python -m build --no-isolation
24+
- name: Publish package
25+
env:
26+
TWINE_USERNAME: __token__
27+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
28+
run: |
29+
twine upload ./dist/*.whl --skip-existing
30+
twine upload ./dist/*.tar.gz --skip-existing
31+
- name : Get Version
32+
id : get_version
33+
run : |
34+
$message = @(git log -1 --oneline --format=%s)
35+
$lines = $message.Split(' ')
36+
$version = $lines[1]
37+
38+
Write-Output "::set-output name=version::$version"
39+
- name: Create Release
40+
id: create_release
41+
uses: actions/create-release@v1
42+
env:
43+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44+
with:
45+
tag_name: ${{ steps.get_version.outputs.version }}
46+
release_name: Version ${{ steps.get_version.outputs.version }}
47+
- uses: eregon/publish-release@v1
48+
env:
49+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
50+
with:
51+
release_id: ${{ steps.create_release.outputs.id }}

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.vscode/
2+
build/
3+
dist/
4+
__pycache__/
5+
*.egg-info
6+
dump
7+
generated/

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
UnityPyTypetreeCodegen
2+
---
3+
Static TypeTree code analysis and code generation for UnityPy
4+

UnityPyTypetreeCodegen/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__version__ = (0, 0, 1)

0 commit comments

Comments
 (0)