add long description to hashtags/interface.py
(#12)
#52
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Executables | |
on: | |
push: | |
tags: | |
- "v[0-9]+.[0-9]+.[0-9]+-?*" | |
workflow_dispatch: | |
jobs: | |
build: | |
strategy: | |
matrix: | |
include: | |
- platform_name: Windows | |
artifact_name: windows | |
os: windows-2022 | |
version_command: icacls "VERSION" /grant Everyone:F /T /C /Q | |
move_command: move dist\mangotango.exe dist\mangotango_windows.exe | |
sha_command: pwsh -c "Get-FileHash -Algorithm SHA1 dist\mangotango_windows.exe | Format-Table Hash -HideTableHeaders > dist\mangotango_windows.exe.sha1" | |
list_command: dir dist | |
- platform_name: MacOS 12 | |
artifact_name: macos-12 | |
os: macos-12 | |
move_command: mv dist/mangotango dist/mangotango_macos_12 | |
sha_command: shasum -a 1 dist/mangotango_macos_12 > dist/mangotango_macos_12.sha1 | |
list_command: ls -ll dist | |
- platform_name: MacOS 13 | |
artifact_name: macos-13 | |
os: macos-13 | |
move_command: mv dist/mangotango dist/mangotango_macos_13 | |
sha_command: shasum -a 1 dist/mangotango_macos_13 > dist/mangotango_macos_13.sha1 | |
list_command: ls -ll dist | |
- platform_name: MacOS 14 | |
artifact_name: macos-14 | |
os: macos-14 | |
move_command: mv dist/mangotango dist/mangotango_macos_14 | |
sha_command: shasum -a 1 dist/mangotango_macos_14 > dist/mangotango_macos_14.sha1 | |
list_command: ls -ll dist | |
- platform_name: MacOS 15 | |
artifact_name: macos-15 | |
os: macos-15 | |
move_command: mv dist/mangotango dist/mangotango_macos_15 | |
sha_command: shasum -a 1 dist/mangotango_macos_15 > dist/mangotango_macos_15.sha1 | |
list_command: ls -ll dist | |
name: Build ${{ matrix.platform_name }} | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.12 | |
- name: Cache dependencies | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cache/pip | |
key: ${{ matrix.os }}-pip-${{ hashFiles('requirements.txt') }} | |
restore-keys: | | |
${{ matrix.os }}-pip- | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Install PyInstaller | |
run: pip install pyinstaller | |
- name: Print version string (for tag) | |
id: get_version_tag | |
if: ${{ github.ref_type == 'tag' }} | |
run: | | |
python -c "with open('VERSION', 'w', encoding='utf-8') as f: f.write('${{ github.ref_name }}')" | |
- name: Print version string (for branch) | |
id: get_version_branch | |
if: ${{ github.ref_type != 'tag' }} | |
run: | | |
python -c "with open('VERSION', 'w', encoding='utf-8') as f: f.write('${{ github.ref_name }}-${{ github.sha }}')" | |
- name: Modify version string permission | |
if: ${{ matrix.version_command }} | |
run: ${{ matrix.version_command }} | |
- name: Build the executable | |
run: | | |
pyinstaller pyinstaller.spec | |
- name: Rename the executable to include platform suffix | |
run: ${{ matrix.move_command }} | |
- name: Compute the SHA1 hashsum | |
run: ${{ matrix.sha_command }} | |
- name: Inspect the dist/ directory before uploading artifacts | |
run: ${{ matrix.list_command }} | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ matrix.artifact_name }} | |
path: | | |
dist/* | |
release: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
path: artifacts | |
- name: Create Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
artifacts/**/* | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |