Skip to content

fix upload to test-pypi #133

fix upload to test-pypi

fix upload to test-pypi #133

Workflow file for this run

name: CI
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [master]
pull_request:
branches: [master]
release:
types: [published]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
Python:
runs-on: windows-latest
steps:
- name: Checkout this Repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.x
- name: Install Workflow Dependencies
run: python3 -m pip install build twine pre-commit -r tests/requirements.txt -r requirements.txt
- uses: actions/cache@v3
with:
path: ~/.cache/pre-commit
key: pre-commit_${{ hashFiles('.pre-commit-config.yaml') }}
- name: Check formatting
run: pre-commit run --all-files
- name: Get test coverage
run: |
coverage run -m pytest
coverage html
echo "$(coverage report --format markdown)" >> $GITHUB_STEP_SUMMARY
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- run: python3 -m build
- name: twine Check
run: twine check dist/*
- name: twine Upload (pypi)
if: github.event_name == 'release'
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.pypi_token }}
run: twine upload dist/*
- name: twine Upload (test-pypi)
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_TOKEN }}
run: twine upload --repository testpypi dist/*
Build:
if: github.event_name == 'push' && github.ref_name == 'master'
runs-on: windows-latest
steps:
- name: Checkout this Repo
uses: actions/checkout@v4
# Runs a this repo's action
- name: Run Build action
id: builder
uses: 2bndy5/rmskin-action@master
with:
path: tests/demo_project
# Use the output from the `builder` step
- name: Print the output filename
run: echo "The output file was ${{ steps.builder.outputs.arc_name }}"