Skip to content

Commit

Permalink
ci: add github actions workflow for release (#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
hamakou108 authored Mar 10, 2023
1 parent 247c516 commit 2e187cb
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
name: CI

on:
push:
branches: main
pull_request:

jobs:
check-and-test:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11"]

steps:
- uses: actions/checkout@v3
- name: Setup PDM
Expand Down
38 changes: 38 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Create the release pull request and release

on:
push:
branches:
- main

permissions:
contents: write
pull-requests: write

jobs:
create-the-release-pull-request-and-release:
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v3
id: release
with:
release-type: python
package-name: depwatch
bump-minor-pre-major: true
bump-patch-for-minor-pre-major: true
- uses: actions/checkout@v2
# these if statements ensure that a publication only occurs when
# a new release is created:
if: ${{ steps.release.outputs.release_created }}
- name: Setup PDM
uses: pdm-project/setup-pdm@v3
with:
python-version: "3.11"
enable-pep582: true
if: ${{ steps.release.outputs.release_created }}
- name: Publish package
run: |
pdm config repository.pypi.username "__token__"
pdm config repository.pypi.password ${{secrets.PYPI_TOKEN}}
pdm publish
if: ${{ steps.release.outputs.release_created }}
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ If you use fine-grained personal access tokens, specify read-only permissions fo

Comming soon!

- TODO: Use [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/)

## License

This code is released under the MIT License. See [LICENSE](/LICENSE) for details.

0 comments on commit 2e187cb

Please sign in to comment.