This repository has been archived by the owner on Mar 1, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
95 additions
and
90 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*.*.*' | ||
|
||
jobs: | ||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
env: | ||
python-version: '3.8' | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Get tag | ||
id: tag | ||
run: echo ::set-output name=tag::${GITHUB_REF#refs/tags/} | ||
- name: Set up Python ${{ env.python-version }} | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: ${{ env.python-version }} | ||
- name: Get Python version | ||
id: python-version | ||
run: | | ||
echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))") | ||
- name: Install Poetry | ||
uses: dschep/install-poetry-action@v1.3 | ||
with: | ||
create_virtualenvs: 'true' | ||
- name: Set Poetry config | ||
run: | | ||
poetry config virtualenvs.in-project true | ||
- name: Get package version | ||
id: package-version | ||
run: echo ::set-output name=version::$(poetry version | grep -Po "\d+\.\d+\.\d+$") | ||
- name: Check if tag matches package version | ||
if: steps.tag.outputs.tag != steps.package-version.outputs.version | ||
run: | | ||
echo Tag: ${{ steps.tag.outputs.tag }} | ||
echo Package version: ${{ steps.package-version.outputs.version }} | ||
echo Tag and package version do not match | ||
exit 1 | ||
- name: Cache Poetry virtualenv | ||
uses: actions/cache@v1 | ||
id: cache | ||
with: | ||
path: .venv | ||
key: poetry-venv-${{ runner.os }}-${{ steps.python-version.outputs.version }} | ||
- name: Install/update package and dependencies | ||
run: poetry install | ||
- name: Create release ${{ steps.tag.outputs.tag }} | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ steps.tag.outputs.tag }} | ||
release_name: ${{ steps.tag.outputs.tag }} | ||
draft: 'false' | ||
prerelease: 'false' | ||
- name: Build and publish to PyPi | ||
env: | ||
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }} | ||
run: poetry publish --build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
.idea/ | ||
.vscode/ | ||
__pycache__/ | ||
|
||
poetry.lock | ||
*.egg-info/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
[tool.poetry] | ||
name = "pecho" | ||
version = "0.2.0" | ||
description = "Easy way to write things like status bars" | ||
authors = ["Nihaal Sangha <18350092+OrangutanGaming@users.noreply.github.com>"] | ||
license = "MIT" | ||
include = ["LICENSE"] | ||
readme = "README.md" | ||
repository = "https://github.com/OrangutanGaming/pecho" | ||
|
||
[tool.poetry.dependencies] | ||
python = "^3.8" | ||
colorama = "^0.4.3" | ||
|
||
[tool.poetry.dev-dependencies] | ||
|
||
[build-system] | ||
requires = ["poetry>=0.12"] | ||
build-backend = "poetry.masonry.api" |
This file was deleted.
Oops, something went wrong.