Skip to content

Commit

Permalink
Fix deployment to Pypi (#11)
Browse files Browse the repository at this point in the history
* Added `package_dir` in setup.cfg

* Fixed codacy
  • Loading branch information
mivek authored Apr 20, 2021
1 parent 215630f commit d71ec3d
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 23 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/github_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- '\d\.\d\.\d'

name: Create a Github release

jobs:
build:
name: Create Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- 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: Release ${{ github.ref }}
draft: false
prerelease: false
23 changes: 3 additions & 20 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,9 @@ on:
tags:
- '\d\.\d\.\d'

name: Create Release and publish to Pypi
name: Publish to Pypi

jobs:
build:
name: Create Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- 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: Release ${{ github.ref }}
draft: false
prerelease: false
deploy:
name: Deploy to PYPI
runs-on: ubuntu-latest
Expand All @@ -41,10 +25,9 @@ jobs:
- name: Build the archives
run: |
python -m build
python -m build --sdist --wheel --outdir dist/
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
uses: pypa/gh-action-pypi-publish@master
with:
user: ${{ secrets.PYPI_USERNAME }}
password: ${{ secrets.PYPI_PASSWORD }}
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Change Log

## [1.1.1] - 2021-04-20

### Fixed

- Added packages source directory in `setup.cfg` to fix deployment.

## [1.1.0] - 2021-03-20

### Added
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ install:

install_deploy:
@echo "Install build/deployment dependencies"
${PYTHON} -m pip install --upgrade build twine
${PYTHON} -m pip install --upgrade build --user
6 changes: 4 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = metar-taf-parser-mivek
version = 1.1.0
version = 1.1.1
author = Jean-Kevin KPADEY
author_email = [email protected]
description = Python project parsing metar and taf message
Expand All @@ -22,11 +22,13 @@ keywords =
airport

[options]
package_dir =
= metar_taf_parser
packages = find:
python_requires = >=3.6
tests_require =
parameterized
coverage

[options.packages.find]
where = src
where = metar_taf_parser

0 comments on commit d71ec3d

Please sign in to comment.