Skip to content

Remove pypi classifiers #233

Remove pypi classifiers

Remove pypi classifiers #233

Workflow file for this run

name: CI/CD
on:
push:
paths-ignore:
- .github/workflows/docker.yml
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
# Cancel previous builds in case of a new build trigger
cleanup-runs:
runs-on: ubuntu-latest
steps:
- uses: rokroskar/workflow-run-cleanup-action@master
env:
GITHUB_TOKEN: "${{ secrets.REPO_ACCESS_TOKEN }}"
if: "!startsWith(github.ref, 'refs/tags/')"
cicd:
strategy:
fail-fast: false
max-parallel: 5
matrix:
python-version: [3.9]
poetry-version: [1.3.2]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Get poetry
uses: abatilo/actions-poetry@v2.0.0
with:
poetry-version: ${{ matrix.poetry-version }}
- name: Poetry config
run: |
poetry install
poetry build
poetry config repositories.test https://test.pypi.org/legacy/
- name: QA
run: |
poetry --version
poetry version
export SETUP_ADMIN_PASSWORD=${{ secrets.SETUP_ADMIN_PASSWORD }}
make test lint
continue-on-error: true
# TODO Because we can only publish new versions look for change of it
- uses: dorny/paths-filter@v2
id: changes
with:
filters: |
toml:
- 'pyproject.toml'
openapi:
- 'telemetry/**'
- name: Publish to AWS
# run only if something in openapi folder is changed
if: steps.changes.outputs.openapi == 'true'
run: echo TODO
- name: Publish to PyPI
# run only if pyproject.toml was changed
# if: steps.changes.outputs.toml == 'true'
#run: poetry publish -r test -u "${{ secrets.PYPI_USERNAME }}" -p "${{ secrets.PYPI_PASSWORD }}"
run: |
poetry publish -u "${{ secrets.PYPI_USERNAME }}" -p "${{ secrets.PYPI_PASSWORD }}"
# wait for the new PyPI release before rebuilding docker image with image-build-event
# TODO find a better way to test when PyPI has a new version
continue-on-error: true
- name: Wait 15 min
if: steps.changes.outputs.toml == 'true'
run: |
sleep 900
- name: Repository Dispatch
if: steps.changes.outputs.toml == 'true'
uses: peter-evans/repository-dispatch@v1
with:
token: ${{ secrets.REPO_ACCESS_TOKEN }}
repository: openremote/openremote-cli
event-type: image-build-event
client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}'