Skip to content
This repository has been archived by the owner on Sep 12, 2024. It is now read-only.

Commit

Permalink
Add release.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
ypkang committed Aug 5, 2024
1 parent 9af2f1e commit 1d50f38
Show file tree
Hide file tree
Showing 2 changed files with 89 additions and 0 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Release to PyPI

on:
push:
tags:
- 'v*.*.*'

jobs:
release:
name: Release
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.12' # Specify your Python version

- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python -
export PATH="$HOME/.poetry/bin:$PATH"
- name: Install dependencies
run: poetry install

- name: Extract version from tag
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\/v/}

- name: Update version in pyproject.toml
run: |
poetry version ${{ steps.get_version.outputs.VERSION }}
- name: Build package
run: poetry build

- name: Configure credentials with Pypi
run: |
poetry config repositories.pypi https://pypi.org/legacy/
poetry config pypi-token.pypi ${{ secrets.PYPI_API_TOKEN }}
- name: Publish package to PyPI
run: poetry publish -r pypi

- name: Create GitHub Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
32 changes: 32 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
[tool.poetry]
name = "jaclang-jaseci"
version = "0.1.0"
description = "jaclang-jaseci is the full stack framework for programs written in jaclang"
authors = ["Jason Mars <[email protected]>", "Yiping Kang <[email protected]>", "Alexie Madolid"]
license = "MIT"
readme = "README.md"
keywords = [
"jac",
"jaclang",
"jaseci",
"python",
"programming-language",
"machine-learning",
"artificial-intelligence",
]
repository = "https://github.com/Jaseci-Labs/jaclang-jaseci"
homepage = "https://jaseci.org"
documentation = "https://jac-lang.org"

[tool.poetry.dependencies]
python = "^3.12.0"

[tool.poetry.group.dev.dependencies]
pytest = "^8.2.1"
pytest-xdist = "^3.6.1"
pytest-cov = "^5.0.0"
pre-commit = "^3.7.1"

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"

0 comments on commit 1d50f38

Please sign in to comment.