mirror of
https://github.com/csd4ni3l/shatterstack.git
synced 2026-01-01 04:23:48 +01:00
Add releasing to nuitka action
- zip before uploading to artifacts - new release step which downloads the artifacts, deletes the latest release and makes a new one
This commit is contained in:
52
.github/workflows/main.yml
vendored
52
.github/workflows/main.yml
vendored
@@ -1,11 +1,14 @@
|
|||||||
|
name: Build and Release
|
||||||
|
|
||||||
on: push
|
on: push
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
name: Build on ${{ matrix.os }}
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [macos-latest, ubuntu-latest, windows-latest]
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||||
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Check-out repository
|
- name: Check-out repository
|
||||||
@@ -14,15 +17,14 @@ jobs:
|
|||||||
- name: Setup Python
|
- name: Setup Python
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: '3.11' # Version range or exact version of a Python version to use, using SemVer's version range syntax
|
python-version: '3.11'
|
||||||
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
|
architecture: 'x64'
|
||||||
cache: 'pip'
|
cache: 'pip'
|
||||||
cache-dependency-path: |
|
cache-dependency-path: |
|
||||||
**/requirements*.txt
|
**/requirements*.txt
|
||||||
|
|
||||||
- name: Install Dependencies
|
- name: Install Dependencies
|
||||||
run: |
|
run: pip install -r requirements.txt
|
||||||
pip install -r requirements.txt
|
|
||||||
|
|
||||||
- name: Build Executable
|
- name: Build Executable
|
||||||
uses: Nuitka/Nuitka-Action@main
|
uses: Nuitka/Nuitka-Action@main
|
||||||
@@ -36,9 +38,37 @@ jobs:
|
|||||||
mode: standalone
|
mode: standalone
|
||||||
output-file: ShatterStack
|
output-file: ShatterStack
|
||||||
|
|
||||||
- name: Upload Artifacts
|
- name: Zip Build Output
|
||||||
|
run: |
|
||||||
|
mkdir -p zip_output
|
||||||
|
zip -r "zip_output/ShatterStack-${{ runner.os }}.zip" build/
|
||||||
|
|
||||||
|
- name: Upload Zipped Build Artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: ${{ runner.os }} Build
|
name: ShatterStack-${{ runner.os }}
|
||||||
path: build/**
|
path: zip_output/ShatterStack-${{ runner.os }}.zip
|
||||||
include-hidden-files: true
|
|
||||||
|
release:
|
||||||
|
name: Create GitHub Release
|
||||||
|
needs: build
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Download All Zipped Builds
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
path: downloads
|
||||||
|
|
||||||
|
- name: Install GitHub CLI
|
||||||
|
uses: cli/cli-action@v2
|
||||||
|
|
||||||
|
- name: Delete Old Release (if exists)
|
||||||
|
continue-on-error: true
|
||||||
|
run: gh release delete latest -y
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Create New "Latest Build" Release
|
||||||
|
run: gh release create latest downloads/**/ShatterStack-*.zip --title "Latest Build" --notes "Most recent multi-platform builds of ShatterStack" --prerelease
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|||||||
Reference in New Issue
Block a user