2021-02-04 07:27:17 +00:00
|
|
|
name: Generate Semantic Release and publish on PyPI
|
2021-02-03 04:51:40 +00:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- v5.x
|
|
|
|
jobs:
|
|
|
|
release:
|
|
|
|
name: Release
|
2022-07-29 13:47:22 +00:00
|
|
|
runs-on: ubuntu-latest
|
2021-02-03 04:51:40 +00:00
|
|
|
steps:
|
2022-07-29 13:47:22 +00:00
|
|
|
- uses: actions/checkout@v2
|
2021-02-03 04:51:40 +00:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
2022-07-29 13:47:22 +00:00
|
|
|
- uses: actions/setup-node@v2
|
2021-02-03 04:51:40 +00:00
|
|
|
with:
|
2022-07-29 13:47:22 +00:00
|
|
|
node-version: 14
|
|
|
|
- uses: actions/setup-python@v4
|
|
|
|
with:
|
|
|
|
python-version: '3.x'
|
|
|
|
|
2021-02-04 07:27:17 +00:00
|
|
|
- name: Setup dependencies
|
|
|
|
run: |
|
|
|
|
npm install @semantic-release/git @semantic-release/exec --no-save
|
2022-07-29 13:47:22 +00:00
|
|
|
python3 -m pip install wheel twine
|
|
|
|
python3 -m pip install git+https://github.com/pypa/hatch
|
|
|
|
|
2021-02-04 07:27:17 +00:00
|
|
|
- name: Create Release
|
2021-02-03 04:51:40 +00:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2021-02-04 10:39:42 +00:00
|
|
|
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
|
|
|
|
PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }}
|
2021-02-03 04:51:40 +00:00
|
|
|
run: npx semantic-release
|