Skip to content

Commit

Permalink
Merge pull request #18 from watchdogpolska/bum-gha-action
Browse files Browse the repository at this point in the history
Update actions in workflows
  • Loading branch information
ad-m authored Sep 23, 2023
2 parents 87b3e74 + adba4c5 commit 75742b7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
django: "==3.2.*"
# Python 3.11 & Django 3.2 raises deprecation warning about deprecated 'cgi' for Python 3.13
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
- name: Build application
run: make build
env:
Expand All @@ -44,7 +44,7 @@ jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
- name: Build application
run: make build
- name: Build documentation
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,34 @@ name: Publish Python 🐍 package

on:
push:
branches:
- '*'
tags:
- 'v*'

jobs:
build-n-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4

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

- name: Build distribution
run: make build_pkg

- name: Publish distribution 📦 to PyPI
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.pypi_password }}

- name: Publish distribution 📦 to Test PyPI
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.test_pypi_password }}
Expand Down

0 comments on commit 75742b7

Please sign in to comment.