Skip to content

Fix version calc when running directly #4

Fix version calc when running directly

Fix version calc when running directly #4

Workflow file for this run

# Copyright (c) 2023, Grillo del Mal
#
# Distributed under the 2-Clause BSD License, see LICENSE file.name: Build & Release
on:
push:
tags:
- '*'
permissions:
contents: write
jobs:
build:
name: Release Build
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: 'windows-latest'
result_name: pytankbattle-windows-x86_64
result_path: src/build/exe.win-amd64-3.12
- os: 'ubuntu-latest'
result_name: pytankbattle-linux-x86_64
result_path: src/build/exe.linux-x86_64-3.12
- os: 'macos-latest'
result_name: pytankbattle-macosx-x86_64
result_path: src/build/exe.macosx-10.9-universal2-3.12
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: 3.12
- run: pip install --upgrade --pre --extra-index-url https://marcelotduarte.github.io/packages/ setuptools_git_versioning cx_Freeze
- run: pip install -r requirements.txt
- run: cd src; python freeze.py build_exe
- name: Archive Zip
uses: thedoctor0/zip-release@main
with:
type: 'zip'
filename: ${{ matrix.result_name }}.zip
directory: ${{ matrix.result_path }}
path: '*'
- name: 'Release ZIP'
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: ${{ matrix.result_path }}/${{ matrix.result_name }}.zip