Skip to content

Commit

Permalink
django 3-4 migration: release gh action
Browse files Browse the repository at this point in the history
  • Loading branch information
dgk committed Aug 26, 2023
1 parent e88366c commit ff95afe
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python 3.10

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
Expand Down
47 changes: 47 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: release

on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+'

jobs:
main:
runs-on: ubuntu-latest

environment:
name: pypi
url: https://pypi.org/p/django-business-logic
permissions:
id-token: write
steps:

- name: Checkout code
uses: actions/checkout@v2

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

- name: Build package
run: |
python setup.py sdist bdist_wheel
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

with:
password: ${{ secrets.PYPI_API_TOKEN }}

- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false

0 comments on commit ff95afe

Please sign in to comment.