Skip to content

Release & publish

Release & publish #5

Workflow file for this run

name: Release & publish
on:
release:
types: [created]
jobs:
publish_pip:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js 16.x
uses: actions/setup-node@v3
with:
node-version: 16.x
cache: 'npm'
cache-dependency-path: webapp/package-lock.json
- uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: 'pip'
cache-dependency-path: |
api/setup.py
cli/setup.py
- name: Install dependencies
run: pip install wheel twine
- name: CLI build
run: cd cli && python ./setup.py bdist_wheel sdist
- name: API build
run: cd api && python ./setup.py bdist_wheel sdist
- name: Webapp wheel build
run: |
cd webapp && npm i
npm run build
python ./setup.py bdist_wheel
- name: Publish to Pypi
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
echo cli/dist/* api/dist/* webapp/dist/*
twine upload cli/dist/* api/dist/* webapp/dist/*
publish_docker:
runs-on: ubuntu-latest
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Build and push
uses: docker/build-push-action@v3
with:
push: true
tags: aguinet/secsend:${{ github.event.release.tag_name }}
file: Dockerfile.prod