Skip to content

Commit

Permalink
initial
Browse files Browse the repository at this point in the history
  • Loading branch information
skshetry committed Jan 1, 2024
1 parent 3ff5fa6 commit de24e39
Show file tree
Hide file tree
Showing 6 changed files with 517 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Build and upload package

on:
push:
branches:
- main
release:
types:
- published
workflow_dispatch:

env:
FORCE_COLOR: 1

permissions:
contents: read

jobs:
build:
name: Build & Verify package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: 3.8
- run: python -m pip install --upgrade build twine
- run: python -m build
- run: twine check --strict dist/*
- uses: actions/upload-artifact@v4
with:
name: Packages
path: dist/

pypi-publish:
name: Publish released package to pypi.org
runs-on: ubuntu-latest
needs: build
if: github.event.action == 'published'
environment:
name: pypi
url: https://pypi.org/p/dvc
permissions:
id-token: write

steps:
- uses: actions/download-artifact@v4
with:
name: Packages
path: dist
- name: Upload package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
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:
push:
branches: [main]

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

env:
FORCE_COLOR: 1

permissions:
contents: read

jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: "3.8"
- uses: pre-commit/action@v3.0.0
- run: pip install .
- run: bscal
- run: bscal 2079
- run: bscal 2079 3
7 changes: 7 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: 'v0.1.9'
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
### Bikram Sambat Calendar

#### Usage

```console
pip install bscal
bscal
```
Loading

0 comments on commit de24e39

Please sign in to comment.