Skip to content

Merge pull request #85 from LeComptoirDesPharmacies/main #87

Merge pull request #85 from LeComptoirDesPharmacies/main

Merge pull request #85 from LeComptoirDesPharmacies/main #87

Workflow file for this run

on:
push:
branches:
- 'develop'
name: Pre-Release App
jobs:
Package_app:
name: Create Pre Release
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-13, windows-latest]
include:
- os: macos-13
path: ~/Library/Caches/pip
- os: windows-latest
path: ~\AppData\Local\pip\Cache
python-version: ['3.8']
steps:
- name: Checkout code
uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- uses: actions/cache@v2
with:
path: ${{ matrix.path }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
pip install -r requirements.txt --extra-index-url https://${{ secrets.DEV_DEPLOY_GEMFURY_TOKEN }}:@pypi.fury.io/lcdp-dev/ --extra-index-url https://${{ secrets.PROD_DEPLOY_GEMFURY_TOKEN }}:@pypi.fury.io/lcdp/
- name: Prepare app
run: python prepare.py
env:
LCDP_ENVIRONMENT: staging
PROVIDER_HOST: www.lcdp.ovh
IS_PROVIDER_SECURE: "True"
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
- run: pip install pyinstaller
- name: Package project
run: pyinstaller app.spec --distpath ./${{ matrix.os }}-${{ github.ref_name }}-app
- name: Zip project
run: 7z a ${{ matrix.os }}-${{ github.ref_name }}-app.zip ./${{ matrix.os }}-${{ github.ref_name }}-app/*
- name: Upload Release
uses: ncipollo/release-action@v1
with:
name: pre-release-${{ github.run_id }}
tag: ${{ github.run_id }}-pre
prerelease: true
commit: ${{ github.sha }}
artifacts: ${{ matrix.os }}-${{ github.ref_name }}-app.zip
token: ${{ secrets.GITHUB_TOKEN }}
allowUpdates: true