mirror of
https://github.com/csd4ni3l/shatterstack.git
synced 2026-01-01 12:33: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
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build on ${{ matrix.os }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [macos-latest, ubuntu-latest, windows-latest]
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||
|
||||
steps:
|
||||
- name: Check-out repository
|
||||
@@ -14,15 +17,14 @@ jobs:
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.11' # Version range or exact version of a Python version to use, using SemVer's version range syntax
|
||||
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
|
||||
python-version: '3.11'
|
||||
architecture: 'x64'
|
||||
cache: 'pip'
|
||||
cache-dependency-path: |
|
||||
**/requirements*.txt
|
||||
|
||||
- name: Install Dependencies
|
||||
run: |
|
||||
pip install -r requirements.txt
|
||||
run: pip install -r requirements.txt
|
||||
|
||||
- name: Build Executable
|
||||
uses: Nuitka/Nuitka-Action@main
|
||||
@@ -36,9 +38,37 @@ jobs:
|
||||
mode: standalone
|
||||
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
|
||||
with:
|
||||
name: ${{ runner.os }} Build
|
||||
path: build/**
|
||||
include-hidden-files: true
|
||||
name: ShatterStack-${{ runner.os }}
|
||||
path: zip_output/ShatterStack-${{ runner.os }}.zip
|
||||
|
||||
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