Skip to content

Allow SonarCloud builds to fail #79

Allow SonarCloud builds to fail

Allow SonarCloud builds to fail #79

Workflow file for this run

name: pre-release
on:
workflow_dispatch:
push:
branches:
- main
- '!stable'
- '!release'
env:
VERSION: 1.0.dev${{ github.run_number }}
jobs:
pre-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.8"
- name: Update Version
shell: pwsh
run: |
$initFile = 'setup.py'
$line = Get-Content $initFile | Select-String 'version=' | Select-Object -ExpandProperty Line
if ($line -ne $null) {
$content = Get-Content $initFile
$content | ForEach-Object {$_ -replace $line, " version='${{ env.VERSION }}',"} | Set-Content $initFile
}
Get-Content $initFile | Write-Host
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build
run: python setup.py sdist bdist_wheel
- name: Publish distribution 📦 to TestPyPI
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
test-linux:
needs: pre-release
uses: christianhelle/autofaker/.github/workflows/test.yml@main
with:
os: ubuntu-latest
test-mac:
needs: pre-release
uses: christianhelle/autofaker/.github/workflows/test.yml@main
with:
os: macos-latest
test-windows:
needs: pre-release
uses: christianhelle/autofaker/.github/workflows/test.yml@main
with:
os: windows-latest