Skip to content

Commit

Permalink
Merge pull request #466 from greenbone/pontos-release
Browse files Browse the repository at this point in the history
Allow to create releases via our bot
  • Loading branch information
y0urself authored Jun 13, 2021
2 parents 9bd7150 + 8d766e0 commit c2673fa
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 32 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/release-pontos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Release Python package with pontos

on:
pull_request:
types: [closed]

jobs:
build-and-release:
env:
GITHUB_USER: ${{ secrets.GREENBONE_BOT }}
GITHUB_MAIL: ${{ secrets.GREENBONE_BOT_MAIL }}
GITHUB_TOKEN: ${{ secrets.GREENBONE_BOT_TOKEN }}
name: Build and release with pontos
# If the label 'make release' is set. If PR is closed because of an merge
if: contains( github.event.pull_request.labels.*.name, 'make release') && github.event.pull_request.merged == true
runs-on: 'ubuntu-latest'
steps:
- uses: actions/checkout@v2
with:
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install poetry and dependencies
uses: greenbone/actions/poetry@v1
- name: Tell git who I am
run: |
git config --global user.name "${{ env.GITHUB_USER }}"
git config --global user.email "${{ env.GITHUB_MAIL }}"
git remote set-url origin https://${{ env.GITHUB_TOKEN }}@github.com/${{ github.repository }}
- name: Prepare release with pontos
run: |
poetry run pontos-release prepare --calendar
- name: Release with pontos
run: |
poetry run pontos-release release
39 changes: 8 additions & 31 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ coverage = "^5.5"
autohooks-plugin-black = {version = "^1.2.0", python = "^3.6"}
black = {version = "21.5b2", python = "^3.6"}
rope = "^0.19.0"
pontos = "^21.4.0"
pontos = "^21.6.3"

[tool.black]
line-length = 80
Expand Down

0 comments on commit c2673fa

Please sign in to comment.