Skip to content

Update SignalTrader.spec to use current working directory for path re… #27

Update SignalTrader.spec to use current working directory for path re…

Update SignalTrader.spec to use current working directory for path re… #27

Workflow file for this run

name: Build and Release EXE
permissions:
contents: write
on:
push:
branches:
- master
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # ensure tags and full history for versioning
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install dependencies
run: |
pip install -r requirements.txt
pip install pyinstaller
- name: Build EXE
run: |
pyinstaller --clean --noconfirm SignalTrader.spec
- name: Upload EXE as Artifact
uses: actions/upload-artifact@v4
with:
name: app-exe
path: dist/*.exe
release:
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0 # fetch all tags for git describe
# Get last tag
- name: Get latest tag
id: get_tag
run: |
git fetch --tags || true
tag=$(git describe --tags --abbrev=0 2>/dev/null || echo "v0.0.0")
echo "TAG=$tag" >> $GITHUB_OUTPUT
# Bump patch version
- name: Bump version
id: bump
run: |
old=${{ steps.get_tag.outputs.TAG }}
IFS='.' read -ra parts <<< "${old#v}"
major=${parts[0]}
minor=${parts[1]}
patch=${parts[2]}
new="v$major.$minor.$((patch+1))"
echo "NEW_TAG=$new" >> $GITHUB_OUTPUT
- name: Download Artifact
uses: actions/download-artifact@v4
with:
name: app-exe
path: ./dist
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.bump.outputs.NEW_TAG }}
name: Release ${{ steps.bump.outputs.NEW_TAG }}
files: |
./dist/*.exe
./config/keywords.json
./config/regex_patterns.json
./settings-template.json
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}