Skip to content

Merge pull request #76 from LeComptoirDesPharmacies/release/v1.9.7 #37

Merge pull request #76 from LeComptoirDesPharmacies/release/v1.9.7

Merge pull request #76 from LeComptoirDesPharmacies/release/v1.9.7 #37

Workflow file for this run

on:
push:
tags:
- 'v*'
name: Release App
jobs:
Package_app:
name: Create release
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, windows-latest]
include:
- os: macos-latest
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: production
PROVIDER_HOST: www.lecomptoirdespharmacies.fr
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:
artifacts: ${{ matrix.os }}-${{ github.ref_name }}-app.zip
token: ${{ secrets.GITHUB_TOKEN }}
allowUpdates: true