Skip to content

Commit

Permalink
chore: create release for CD action
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanlinjui committed Aug 13, 2024
1 parent c979674 commit 87b19db
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 5 deletions.
27 changes: 23 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,32 @@ name: Publish to PyPI
on:
push:
tags:
- "v*.*.*"
- "*.*.*"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build and publish to pypi
- name: Checkout Code Repository
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'

- name: Build and Publish to PyPI
uses: JRubics/poetry-publish@v2.0
with:
pypi_token: ${{ secrets.PIPY_API_TOKEN }}
pypi_token: ${{ secrets.PIPY_API_TOKEN }}

- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
body: |
This is a release for the version ${{ github.ref }}.
PyPI package: https://pypi.org/project/${{ github.repository }}/${{ github.ref }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ cp-hw/
.venv/
poetry.lock

# build files
dist/

# log files
*.log

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "cpGrader"
version = "0.1.0"
version = "0.1.2"
description = "A Python Package to Grade Programming Assignments Automatically."
authors = ["ryanlinjui <ryanlinjui@gmail.com>"]
readme = "README.md"
Expand Down

0 comments on commit 87b19db

Please sign in to comment.