chore: release 1.19.0 (#72) #28
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: upload-release | |
# This builds, packages and releases pygluu-compose | |
on: | |
push: | |
tags: | |
- '*' | |
workflow_dispatch: | |
jobs: | |
publish: | |
name: Publish for ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
include: | |
- os: ubuntu-latest | |
artifact_name: pygluu-compose.pyz | |
asset_name: pygluu-compose-linux-amd64.pyz | |
#- os: windows-latest | |
# artifact_name: pygluu-compose.pyz | |
# asset_name: pygluu-compose-windows-amd64 | |
- os: macos-latest | |
artifact_name: pygluu-compose.pyz | |
asset_name: pygluu-compose-macos-amd64.pyz | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Python 3.9 | |
uses: actions/[email protected] | |
with: | |
python-version: 3.9 | |
- name: Install dependencies | |
run: | | |
python3 -m pip install --upgrade pip | |
pip3 install jq | |
- name: Lint with flake8 | |
run: | | |
pip3 install flake8 | |
# stop the build if there are Python syntax errors or undefined names | |
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | |
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | |
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Build Zipapp | |
run: | | |
sudo apt-get update || brew install jq | |
sudo apt-get install build-essential || echo "Maybe im on macos OS" | |
pip3 install -U shiv wheel setuptools | |
cd pygluu-compose | |
make zipapp | |
- name: Get project | |
id: project | |
run: | | |
echo "::set-output name=gituser::$(python3 -c 'import os ; REPO = os.environ.get("GITHUB_REPOSITORY") ; print(str(REPO).split("/")[0])')" | |
echo "::set-output name=gitproject::$(python3 -c 'import os ; REPO = os.environ.get("GITHUB_REPOSITORY") ; print(str(REPO).split("/")[1])')" | |
- name: Get latest tag | |
id: previoustag | |
run: | | |
echo "::set-output name=tag::$(curl https://api.github.com/repos/${{ steps.project.outputs.gituser }}/${{ steps.project.outputs.gitproject }}/releases/latest -s | grep "tag_name" | cut -d '"' -f 4)" | |
- name: Print Version | |
run: | | |
echo "${{ steps.previoustag.outputs.tag }}" | |
- name: Upload binaries to release | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.MOWORKFLOWTOKEN }} | |
file: pygluu-compose/${{ matrix.artifact_name }} | |
asset_name: ${{ matrix.asset_name }} | |
tag: ${{ steps.previoustag.outputs.tag }} |