Skip to content

fix: missing to login github registry #5

fix: missing to login github registry

fix: missing to login github registry #5

Workflow file for this run

name: Release and PyPI Upload
on:
push:
tags:
- '*'
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Log in to GitHub Container Registry
run: echo "${{ secrets.GH_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Run Semantic Release with Docker
run: |
docker run \
-e GITHUB_TOKEN=${{ secrets.GH_TOKEN }} \
-v $(pwd):/app \
-w /app \
ghcr.io/semantic-release/semantic-release:latest
upload-to-pypi:
needs: release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install twine
- name: Build and upload to PyPI
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}