Skip to content

Commit

Permalink
feat(release): fixed ci workflow
Browse files Browse the repository at this point in the history
Signed-off-by: Ujjwal Kumar <[email protected]>
  • Loading branch information
uibm committed Jan 6, 2025
1 parent a5a480b commit cc90776
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 51 deletions.
64 changes: 64 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: CI

on:
push:
branches: [master]
tags: ['v*']
pull_request:
branches: [master]

jobs:
test:
runs-on: ubuntu-latest
environment: ci
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11']

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'

- name: Install pandoc
run: |
sudo apt-get update
sudo apt-get install pandoc
pip install pypandoc
- name: Install npm
run: |
npm install -g npm@latest || npm install -g npm@9
- name: Install dependencies
run: pip install 'tox<4'

- name: Run tests
run: tox

- name: Install release dependencies
if: github.ref == 'refs/heads/master' && matrix.python-version == '3.8'
run: |
pip install bump-my-version
npm install -g --save-dev \
@semantic-release/changelog \
@semantic-release/exec \
@semantic-release/git \
@semantic-release/github
- name: Semantic Release
if: github.ref == 'refs/heads/master' && matrix.python-version == '3.8'
run: npx semantic-release

- name: Publish to PyPI
if: startsWith(github.ref, 'refs/tags/') && matrix.python-version == '3.8'
run: |
pip install build twine
python -m build
python -m twine upload dist/* -u __token__ -p ${{ secrets.PYPI_TOKEN }}
51 changes: 0 additions & 51 deletions .travis.yml

This file was deleted.

0 comments on commit cc90776

Please sign in to comment.