Skip to content

Merge pull request #224 from wp99cp/develop #47

Merge pull request #224 from wp99cp/develop

Merge pull request #224 from wp99cp/develop #47

name: Create Release
# See docu/Continuous Integration And_General_Tests.md for detailed information-module.
on:
push:
branches:
- master
jobs:
create_release_tag:
name: Create Release
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- uses: actions/setup-node@v2-beta
with:
node-version: '16'
- name: Load Version of Latest Release
id: check # This will be the reference for getting the outputs.
uses: EndBug/version-check@v1
with:
file-name: ./frontend/package.json
file-url: ::before
static-checking: localIsNew
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: v${{ steps.check.outputs.version }}
release_name: Version ${{ steps.check.outputs.version }}
body: ${{ github.event.head_commit.message }}
draft: false
prerelease: false
build_and_deploy_frontend:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: npm ci && npm run build:prod
working-directory: frontend
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
entryPoint: ./frontend
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_CEVIZH11_MENUPLANUNG }}'
channelId: live
projectId: cevizh11-menuplanung
env:
FIREBASE_CLI_PREVIEWS: hostingchannels
execute_release_scripts:
runs-on: ubuntu-latest
steps:
- name: checkout repo content
uses: actions/checkout@v2
#install the python needed
- name: setup python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: install packages
run: |
python -m pip install --upgrade pip
pip install -r ./deployment_scripts/requirements.txt
# run copy_help_messages_to_production_DB.py
- name: execute py script
env:
MENUPLANUNG_PRIVATE_KEY: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_CEVIZH11_MENUPLANUNG__PRIVATE_KEY }}'
CEVIZH11_PRIVATE_KEY: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_CEVIZH11__PRIVATE_KEY }}'
run: python ./deployment_scripts/copy_help_messages_to_production_DB.py