Skip to content

update github actions (5) #58

update github actions (5)

update github actions (5) #58

Workflow file for this run

name: Build
on:
push:
branches:
- master
- feat/pdm
tags:
- v*
jobs:
Build:
runs-on: [self-hosted, linux]
steps:
- run: echo "${HOME}/.local/bin" >> $GITHUB_PATH
- uses: actions/checkout@master
with:
submodules: recursive
- name: Set up Python
uses: actions/setup-python@master
with:
python-version: "3.8"
- name: create venv
run: python -m venv .venv
- name: install requirements
run: |
curl -sSL https://raw.githubusercontent.com/pdm-project/pdm/main/install-pdm.py | python3 -
. .venv/bin/activate
pdm install --dev
- name: build / run tests
run: |
. .venv/bin/activate
export PYTHONPATH=$PWD
make build
make lint
make test
- name: archive whl
uses: actions/upload-artifact@master
with:
name: dist
path: dist/*.whl
- name: Set up Node
uses: actions/setup-node@master
with:
node-version: 14
- name: Publish docs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GIT_AUTHOR_NAME: Github Actions
GIT_AUTHOR_EMAIL: [email protected]
npm_config_cache: ./npm-cache
run: |
. .venv/bin/activate
export PYTHONPATH=$PWD
git remote set-url origin https://git:${GITHUB_TOKEN}@github.gamma.bcg.com/${GITHUB_REPOSITORY}.git
make publish-docs
Publish:
runs-on: [self-hosted, linux]
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
steps:
- uses: actions/[email protected]
- uses: actions/download-artifact@master
with:
name: dist
- name: Publish
run: |
. .venv/bin/activate
export PYTHONPATH=$PWD
make publish