Skip to content

Commit

Permalink
Trigger build and deployment via GitHub Actions (#1)
Browse files Browse the repository at this point in the history
* Add github workflow; edit package name to prepare publishing to PyPI

* Finalize github workflow

* Add install instructions to readme

* Add MIT license

* Update pyproject.yaml

* Bump version number

* Update readme
  • Loading branch information
dotcs committed Apr 17, 2022
1 parent ae9a568 commit 1d6f82f
Show file tree
Hide file tree
Showing 4 changed files with 75 additions and 5 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Publish

on:
push:
tags:
- '*'

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v3
with:
python-version: '3.10'
architecture: 'x64'
- name: Install poetry
run: pip install poetry
- name: Build with poetry
run: poetry build
- name: Publish
run: poetry publish --username __token__ --password ${{ secrets.PYPI_TOKEN }}
11 changes: 11 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
The MIT License (MIT)

Copyright © 2022 dotcs <https://dotcs.me>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Fork this project to create your own MIT license that you can always link to.
29 changes: 27 additions & 2 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,30 @@ This tool requires [fzf] to be installed on the machine to filter available comi

## Installation

tbd
### With pip

Install this package directly from the [Python Package Index (PyPI)][pypi-repo].
The CLI tool requires Python >= 3.8 to be installed.

```console
$ pip install dcs-xkcd-cli
```

This will install a CLI tool named `xkcd` which can be used as described below.

### With pipx

Installation with [pipx] is similar to the pip variant above, but uses `pipx` instead of `pip`.

```console
$ pipx install dcs-xkcd-cli
```

Note that with pipx, this package can be tried out without the need to install it permanently.

```console
$ pipx run dcs-xkcd-cli <args>
```


## Usage
Expand Down Expand Up @@ -75,4 +98,6 @@ $ xkcd update-cache
[archive]: https://xkcd.com/archive/
[xkcd]: https://xkcd.com
[munroe]: https://en.wikipedia.org/wiki/Randall_Munroe
[explain-xkcd-categories]: https://www.explainxkcd.com/wiki/index.php/Category:Comics_by_topic
[explain-xkcd-categories]: https://www.explainxkcd.com/wiki/index.php/Category:Comics_by_topic
[pypi-repo]: https://pypi.org/project/dcs-xkcd-cli/
[pipx]: https://pypa.github.io/pipx/
18 changes: 15 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
[tool.poetry]
name = "xkcd-cli"
version = "0.1.0"
description = ""
name = "dcs-xkcd-cli"
version = "0.1.1"
description = "Get your daily dose of xkcd directly from the terminal! 🤩"
authors = ["dotcs <repositories@dotcs.me>"]
readme = "Readme.md"
license = "MIT"
keywords = ["cli", "cli-app", "xkcd", "xkcd-comics"]
homepage = "https://github.com/dotcs/xkcd-cli"
repository = "https://github.com/dotcs/xkcd-cli"
include = [
"LICENSE",
]

packages = [
{include = "xkcd_cli"}
]

[tool.poetry.dependencies]
python = "^3.8"
Expand Down

0 comments on commit 1d6f82f

Please sign in to comment.