Skip to content

keep the changelog generator simple #13

keep the changelog generator simple

keep the changelog generator simple #13

Workflow file for this run

name: Build and Create Release
on:
push:
# branches:
# - main
# pull_request: null
tags:
- 'v*.*.*'
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install dependencies (Bash)
if: runner.os != 'Windows'
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pyinstaller
pip install yahooquery
pip install tkmacosx
shell: bash
- name: Install dependencies (PowerShell)
if: runner.os == 'Windows'
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pyinstaller
pip install yahooquery
pip install tkmacosx
shell: pwsh
- name: Create executable (macOS)
if: matrix.os == 'macos-latest'
run: |
pyinstaller --onefile --noconsole --add-data "assets:assets" user_interface.py
hdiutil create -volname UserInterface -srcfolder dist/ -ov -format UDZO dist/user_interface.dmg
shell: bash
- name: Create executable (Linux)
if: matrix.os == 'ubuntu-latest'
run: |
pyinstaller --onefile --noconsole --add-data "assets:assets" user_interface.py
shell: bash
- name: Create executable (Windows)
if: matrix.os == 'windows-latest'
run: |
pyinstaller --onefile --noconsole --add-data "assets;assets" user_interface.py
shell: pwsh
- name: Upload artifacts (macOS)
if: matrix.os == 'macos-latest'
uses: actions/upload-artifact@v4
with:
name: user_interface-macOS
path: dist/user_interface.dmg
- name: Upload artifacts (Linux)
if: matrix.os == 'ubuntu-latest'
uses: actions/upload-artifact@v4
with:
name: user_interface-Linux
path: dist/user_interface
- name: Upload artifacts (Windows)
if: matrix.os == 'windows-latest'
uses: actions/upload-artifact@v4
with:
name: user_interface-Windows
path: dist/user_interface.exe
release:
needs: build
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Download macOS artifact
uses: actions/download-artifact@v4
with:
name: user_interface-macOS
path: ./artifacts/macos
- name: Download Linux artifact
uses: actions/download-artifact@v4
with:
name: user_interface-Linux
path: ./artifacts/linux
- name: Download Windows artifact
uses: actions/download-artifact@v4
with:
name: user_interface-Windows
path: ./artifacts/windows
- name: Install Ruby
run: sudo apt-get install ruby-full
- name: Install GitHub Changelog Generator
run: sudo gem install github_changelog_generator
- name: Generate CHANGELOG
run: |
github_changelog_generator -u cortisiko -p stockAnalysis --token ${{ secrets.GITHUB_TOKEN }}
- name: Create GitHub Release
id: create_release
uses: actions/create-release@v1
with:
tag_name: {{ github.ref }}

Check failure on line 130 in .github/workflows/release.yml

View workflow run for this annotation

GitHub Actions / Build and Create Release

Invalid workflow file

The workflow is not valid. .github/workflows/release.yml (Line: 130, Col: 21): A mapping was not expected
release_name: Release {{ github.ref }}
body_path: CHANGELOG.md
draft: true
prerelease: true
- name: Upload Release Asset (macOS)
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./artifacts/macos/user_interface.dmg
asset_name: user_interface.dmg
asset_content_type: application/octet-stream
- name: Upload Release Asset (Linux)
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./artifacts/linux/user_interface
asset_name: user_interface
asset_content_type: application/octet-stream
- name: Upload Release Asset (Windows)
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./artifacts/windows/user_interface.exe
asset_name: user_interface-Windows.exe
asset_content_type: application/octet-stream