Skip to content

Commit

Permalink
[MISC] Project configs updated
Browse files Browse the repository at this point in the history
  • Loading branch information
ppfeufer committed Dec 9, 2024
1 parent 2ebc918 commit 9b3f6f7
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Release to PyPI
name: Release

on:
release:
Expand All @@ -7,8 +7,8 @@ on:

jobs:
release:
# Release to PyPI
name: Release on Pypi
# Release
name: Release
runs-on: ubuntu-latest

steps:
Expand All @@ -29,12 +29,21 @@ jobs:
python -m pip install --upgrade build
python -m pip install --upgrade setuptools wheel twine
# Package and Upload
- name: Package and Upload
# Package and Upload to PyPI
- name: Package and Upload to PyPI
env:
STACKMANAGER_VERSION: ${{ github.event.release.tag_name }}
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_APIKEY }}
run: |
python -m build
python -m twine upload dist/*
# Add Assets to Release on GitHub
- name: Add Assets to Release on GitHub
uses: softprops/action-gh-release@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
# The name of the file(s) to upload
files: |
dist/*
25 changes: 25 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,33 @@
appname = aa-fleetpings
appname_verbose = AA Fleet Pings
package = fleetpings
translation_template = $(package)/locale/django.pot
git_repository = https://github.com/ppfeufer/$(appname)
git_repository_issues = $(git_repository)/issues

# Default goal
.DEFAULT_GOAL := help

# Confirm action
.PHONY: confirm-action
confirm-action:
@read -p "Are you sure you want to run '$(MAKECMDGOALS)'? [Y/n] " response; \
response=$${response:-Y}; \
if [ "$$response" != "Y" ] && [ "$$response" != "y" ]; then \
echo "Aborted"; \
exit 1; \
fi

# General confirmation
.PHONY: confirm
confirm:
@read -p "Are you sure? [Y/n] " response; \
response=$${response:-Y}; \
if [ "$$response" != "Y" ] && [ "$$response" != "y" ]; then \
echo "Aborted"; \
exit 1; \
fi

# Graph models
.PHONY: graph_models
graph_models:
Expand All @@ -26,6 +49,8 @@ prepare-release: graph_models translations
@echo "Preparing a release"
@read -p "New Version Number: " new_version; \
sed -i "/__version__/c\__version__ = \"$$new_version\"" $(package)/__init__.py; \
sed -i "/\"Project-Id-Version: /c\\\"Project-Id-Version: $(appname_verbose) $$new_version\\\n\"" $(translation_template); \
sed -i "/\"Report-Msgid-Bugs-To: /c\\\"Report-Msgid-Bugs-To: $(git_repository_issues)\\\n\"" $(translation_template); \
echo "Updated version in $(TEXT_BOLD)$(package)/__init__.py$(TEXT_BOLD_END)"

# Help
Expand Down

0 comments on commit 9b3f6f7

Please sign in to comment.