Skip to content

Merge pull request #31 from cpainchaud/dependabot/pip/cryptography-43… #543

Merge pull request #31 from cpainchaud/dependabot/pip/cryptography-43…

Merge pull request #31 from cpainchaud/dependabot/pip/cryptography-43… #543

Workflow file for this run

name: Build and Release Executables for Windows
on:
push:
branches: [ master, dev ]
tags:
- 'v*.*.*'
pull_request:
branches: [ master ]
jobs:
build_and_publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Change Pylo Version if this is a DEV build
if: github.ref == 'refs/heads/dev' && github.event_name == 'push'
run: |
echo "Update version to append '-dev-' and current date ISO format:"
# for double quoted strings version
sed -i -E "s/__version__ = \"([0-9]+\.[0-9]+\.[0-9]+)\"/__version__ = '\\1-dev-$(date +'%Y%m%d')'/" illumio_pylo/__init__.py
# for single quoted strings version
sed -i -E "s/__version__ = '([0-9]+\.[0-9]+\.[0-9]+)'/__version__ = '\\1-dev-$(date +'%Y%m%d')'/" illumio_pylo/__init__.py
grep __version__ illumio_pylo/__init__.py
- name: Make executables
uses: cpainchaud/pyinstaller-action-windows@main
with:
path: ./
spec: illumio_pylo/utilities/
extra_python_paths: Z:\\github\\workspace\\;Z:\\github\\workspace\\pylo;C:\\Windows\\System32\\downlevel
- name: rename executables
run: |
mv dist/windows/cli.exe dist/windows/pylo-cli.exe
- name: Publish executables along with the tag for a release
# only if this is a TAG type
if: startsWith(github.ref, 'refs/tags/') && github.event_name == 'push'
uses: softprops/action-gh-release@975c1b265e11dd76618af1c374e7981f9a6ff44a # v0.1.16
with:
files: dist/windows/*
token: ${{ secrets.GITHUB_TOKEN }}
release_name: "latest"
release_body: "Latest Binaries"
draft: false
prerelease: false
- name: Publish executables for Master branch with 'latest' tag
# only if this is a TAG type
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
uses: "crowbarmaster/GH-Automatic-Releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
prerelease: true
title: "Latest Binaries"
files: |
dist/windows/*
- name: Publish executables for Dev branch
if: github.ref == 'refs/heads/dev' && github.event_name == 'push'
uses: "crowbarmaster/GH-Automatic-Releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "dev-latest"
prerelease: false
title: "Latest Binaries for DEV/Unstable branch"
files: |
dist/windows/*