Skip to content

Commit

Permalink
Merge pull request #6 from philips-labs/chore/github-actions
Browse files Browse the repository at this point in the history
Chore/GitHub actions
  • Loading branch information
koendelaat authored Mar 10, 2022
2 parents 508a2c4 + 1415f1e commit d3e811d
Show file tree
Hide file tree
Showing 7 changed files with 103 additions and 2 deletions.
75 changes: 75 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@

name: CI

# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
tags:
- "v*.*.*"
pull_request:
branches: [ master ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ macos-latest, windows-latest, ubuntu-latest ]

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
with:
fetch-depth: 0 # Needed for versioning based on tags

- uses: actions/setup-python@v2
with:
python-version: '3.9'
architecture: 'x64'

- name: Install requirements
run: |
pip install .
pip install -r requirements-dev.txt
- name: Build executable
if: runner.os == 'Windows'
run: pyinstaller --name igtcloud-$env:RUNNER_OS -F -i .github/workflows/philips.ico .github/workflows/cli.py

- name: Build executable
if: runner.os != 'Windows'
run: pyinstaller --name igtcloud-$RUNNER_OS -F .github/workflows/cli.py

- name: Upload executable
uses: actions/upload-artifact@v3
with:
name: executables
path: dist/igtcloud*

release:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
needs: build
steps:
- uses: actions/checkout@v2
- name: Download executables
uses: actions/download-artifact@v3
with:
name: executables
path: dist
- name: Release
uses: softprops/action-gh-release@v1
with:
files: |
dist/igtcloud*
LICENSE
3 changes: 3 additions & 0 deletions .github/workflows/cli.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from igtcloud.client.tools.cli import cli

cli()
Binary file added .github/workflows/philips.ico
Binary file not shown.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,5 @@ __pycache__
.idea

**/__version__.py
**/.openapi-generator/**
**/.openapi-generator/**
*.spec
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2022 Koninklijke Philips N.V, https://www.philips.com

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
1 change: 1 addition & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pyinstaller
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def dev_scheme(version):
name='igtcloudclient',
use_scm_version={'write_to': 'src/igtcloud/client/__version__.py', 'local_scheme': dev_scheme},
author='Koen de Laat (Philips)',
license="Apache License 2.0",
license="MIT",
author_email='[email protected]',
url='https://www.philips.com',
description='IGT Cloud client',
Expand Down

0 comments on commit d3e811d

Please sign in to comment.