-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
648 additions
and
111 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
name: Release | ||
|
||
jobs: | ||
create-release: | ||
name: Create release | ||
runs-on: ubuntu-latest | ||
outputs: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
tag_name: ${{ steps.tag_name.outputs.tag }} | ||
steps: | ||
- name: Get tag name | ||
id: tag_name | ||
uses: olegtarasov/get-tag@v2.1 | ||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_API_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: ${{ steps.tag_name.outputs.tag }} | ||
body: | | ||
# Draft release (${{ steps.tag_name.outputs.tag }}) | ||
[Guide for updating](https://github.com/YariKartoshe4ka/Space-Way/blob/master/docs/UPDATE.md) | ||
### Changes | ||
draft: true | ||
prerelease: false | ||
|
||
build-windows: | ||
name: Build for Windows | ||
runs-on: windows-latest | ||
needs: create-release | ||
steps: | ||
- name: Setup Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
- name: Install Pyinstaller | ||
run: pip install pyinstaller==4.3 | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Install Space Way | ||
run: pip install . | ||
- name: Build binary | ||
run: pyinstaller --onefile --noconsole --icon=spaceway/icon.ico --collect-all spaceway "Space Way.py" | ||
- name: Upload binary | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_API_TOKEN }} | ||
with: | ||
upload_url: ${{ needs.create-release.outputs.upload_url }} | ||
asset_path: "./dist/Space Way.exe" | ||
asset_name: "Space-Way-${{ needs.create-release.outputs.tag_name }}.exe" | ||
asset_content_type: application/exe | ||
|
||
publish-pypi: | ||
name: Publish on PyPI | ||
runs-on: ubuntu-latest | ||
needs: create-release | ||
steps: | ||
- name: Setup Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
- name: Install dependencies | ||
run: pip install build | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: pypi | ||
- name: Build project | ||
run: python -m build --sdist --wheel --outdir dist/ . | ||
- name: Publish to Test PyPI | ||
uses: pypa/gh-action-pypi-publish@master | ||
with: | ||
password: ${{ secrets.PYPI_API_TOKEN }} | ||
- name: Get path to wheel | ||
id: wheel_path | ||
run: | | ||
cd ./dist | ||
echo '::set-output name=path::'$(ls -t *.whl | head -1) | ||
- name: Upload wheel to GitHub | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_API_TOKEN }} | ||
with: | ||
upload_url: ${{ needs.create-release.outputs.upload_url }} | ||
asset_path: ./dist/${{ steps.wheel_path.outputs.path }} | ||
asset_name: ${{ steps.wheel_path.outputs.path }} | ||
asset_content_type: application/x-wheel+zip | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
pygame==1.9.6 | ||
pygame==2.0.2.dev2 | ||
packaging==20.4 | ||
requests==2.24.0 | ||
appdirs==1.4.4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,9 @@ | ||
{ | ||
"caption": "Space Way", | ||
"mode": [700, 450], | ||
"FPS": 30, | ||
"FPS": 60, | ||
"scene": "headpiece", | ||
"sub_scene": "headpiece", | ||
"speed": 2, | ||
"score": 0, | ||
"version": "2.0.1", | ||
"version": "2.1.0", | ||
"debug": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.