Skip to content

Commit

Permalink
ci: automated releases for main
Browse files Browse the repository at this point in the history
  • Loading branch information
dan-wilton committed Jun 4, 2024
1 parent 417d9f3 commit f6a8a34
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/bump-version-main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Bump version

on:
push:
branches:
- main

jobs:
bump-version:
if: "!startsWith(github.event.head_commit.message, 'bump:')"
runs-on: ubuntu-latest
name: "Bump version and create changelog with commitizen"
steps:
- name: Check out
uses: actions/checkout@v3
with:
token: "${{ secrets.PERSONAL_ACCESS_TOKEN }}"
fetch-depth: 0

- name: Create bump and changelog
uses: commitizen-tools/commitizen-action@master
with:
github_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
changelog_increment_filename: body.md

- name: Release
uses: softprops/action-gh-release@v1
with:
body_path: "body.md"
tag_name: ${{ env.REVISION }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29 changes: 29 additions & 0 deletions .github/workflows/release-main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Upload Python Package

on:
push:
tags:
- "*" # Will trigger for every tag, alternative: 'v*'

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up PDM
uses: actions/setup-pdm@v4

- name: Install dependencies
run: |
pdm --version
pdm install
- name: Build and publish
env:
PYPI_USERNAME: __token__
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
pdm publish
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ Sitemappy is a command-line application, and also provides Python interfaces for
- [ ] Introduce `multiprocessing`
- [ ] Distributed multiprocessing
- [x] Publish to PyPi 🚀
- [x] GitHub Workflows (deploy)
- [ ] GitHub Workflows (linting, unit testing, dev deployments)

## 🚀 Usage

Expand Down

0 comments on commit f6a8a34

Please sign in to comment.