Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and deploy a branch | |
on: | |
push: | |
branches: | |
- '**' | |
tags: | |
- '*' | |
workflow_dispatch: | |
env: | |
CI: true | |
DEPLOY_BUCKET: protocol-library-builds | |
jobs: | |
build-deploy: | |
runs-on: 'ubuntu-22.04' | |
timeout-minutes: 10 | |
steps: | |
- uses: 'actions/setup-python@v4' | |
with: | |
python-version: '3.8' | |
- run: curl https://pyenv.run | bash | |
- run: sudo apt-get update && sudo apt-get install libsystemd-dev | |
- uses: 'actions/checkout@v3' | |
- run: | | |
pip install -e otcustomizers | |
pip install -r protolib/requirements.txt | |
pip install flake8==3.8.4 pytest | |
- run: make setup | |
- run: | | |
python --version | |
python3 --version | |
- name: 'Lint with flake8' | |
run: | | |
flake8 protocols/ protolib/ | |
- name: 'Check builds up to date' | |
run: | | |
./checkChanges.sh | |
- name: 'Check readme.md' | |
run: | | |
python ./scripts/bad-README-subcategory.py | |
- name: 'Build' | |
run: | | |
make build | |
- name: 'Deploy' | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
AWS_DEFAULT_REGION: us-west-2 | |
run: | | |
aws s3 sync --acl=private releases/deploy/ s3://${{env.DEPLOY_BUCKET}}/${{github.ref_name}} |