Skip to content

numpy...

numpy... #115

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: Build
on:
workflow_dispatch:
push:
branches: [ dev ]
defaults:
run:
shell: bash
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
permissions:
contents: write
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, windows-latest ]
python: [ "3.11" ]
include:
- os: windows-2019
python: "3.7"
outputs:
ver: ${{ steps.build.outputs.ver }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
cache: 'pip'
cache-dependency-path: |
**/requirements*.txt
- name: Install dependencies
run: |
pip install -r requirements.txt -r requirements-dev.txt
- name: Build
id: build
run: |
echo "ver=v$(bash semver.sh)" | tee "$GITHUB_OUTPUT"
[[ ${{ matrix.os }} != windows-latest ]] || pyinstaller -y decoder.spec
pyinstaller -y decoder-onefile.spec
- name: Dist rename
run: |
ls -ahl dist
case ${{ matrix.os }} in
ubuntu-latest)
mv dist/SatsDecoder dist/SatsDecoder-linux
;;
windows-2019)
mv dist/SatsDecoder.exe dist/SatsDecoder-win7.exe
;;
windows-latest)
mv dist/SatsDecoder dist/SatsDecoder-win
;;
esac
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: SatsDecoder-${{ matrix.os }}
path: dist/*
nightly-release:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/download-artifact@v4
- name: Collect
run: |
mkdir -p out
cp -r SatsDecoder-*/* out/
cd out
zip SatsDecoder-win -mr SatsDecoder-win
- name: Cleanup
continue-on-error: true
run: gh release delete nightly -R ${{ github.repository }} --cleanup-tag -y
- name: Create nightly release
run: gh release create nightly -R ${{ github.repository }} -t nightly --target dev --generate-notes --prerelease out/*
- name: Create Badge
uses: schneegans/[email protected]
env:
ver: ${{ needs.build.outputs.ver }}
with:
auth: ${{ secrets.GIST_SECRET }}
gistID: 7270038ca73e8e5f1acea6280cc8a416
filename: satsdecoder-pre.json
label: dev
message: ${{ env.ver }}
color: yellow