Skip to content

Commit

Permalink
Use github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
rohanpm committed Feb 23, 2024
1 parent c4f3143 commit 99924b5
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 51 deletions.
51 changes: 0 additions & 51 deletions .circleci/config.yml

This file was deleted.

32 changes: 32 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: CI

on:
pull_request:
branches: [main]
workflow_call: {}

jobs:
run-ci:
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: |
3.8
3.9
3.10
3.11
3.12
- name: Install dependencies
run: |
python -m pip install -U pip
pip install tox
- name: Run tests
run: |
tox -s false
40 changes: 40 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Release to PyPI

on:
push:
tags:
- v**
workflow_dispatch: {}

jobs:
run-ci:
uses: ./.github/workflows/ci.yml

pypi-publish:
name: Upload release to PyPI
needs: [run-ci]
runs-on: ubuntu-22.04
environment:
name: pypi
url: https://pypi.org/p/pidiff
permissions:
id-token: write
steps:
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.12

- name: Install dependencies
run: |
python -m pip install -U pip
pip install build
- name: Build distribution
run: |
python -mbuild
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit 99924b5

Please sign in to comment.