Skip to content

Commit

Permalink
Change: Use release action
Browse files Browse the repository at this point in the history
  • Loading branch information
y0urself authored and bjoernricks committed Feb 3, 2023
1 parent a9dd72a commit ec8f1af
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 25 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/release-pontos-manually.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Manually release Python package with pontos

on:
workflow_dispatch:
inputs:
branch:
description: "Branch"
required: true
default: "main"

jobs:
build-and-release:
name: Build and release with pontos
runs-on: "ubuntu-latest"
steps:
- name: Release with release action
uses: greenbone/actions/release@v2
with:
version: "3.10"
conventional-commits: true
ref: ${{ github.event.inputs.branch }}
github-user: ${{ secrets.GREENBONE_BOT }}
github-user-mail: ${{ secrets.GREENBONE_BOT_MAIL }}
github-user-token: ${{ secrets.GREENBONE_BOT_TOKEN }}
gpg-key: ${{ secrets.GPG_KEY }}
gpg-fingerprint: ${{ secrets.GPG_FINGERPRINT }}
gpg-passphrase: ${{ secrets.GPG_PASSPHRASE }}
strategy: calendar
39 changes: 14 additions & 25 deletions .github/workflows/release-pontos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,32 +6,21 @@ on:

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'
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install poetry and dependencies
uses: greenbone/actions/poetry@v2
- 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
- name: Release with release action
uses: greenbone/actions/release@v2
with:
version: "3.10"
conventional-commits: true
ref: ${{ github.ref_name }}
github-user: ${{ secrets.GREENBONE_BOT }}
github-user-mail: ${{ secrets.GREENBONE_BOT_MAIL }}
github-user-token: ${{ secrets.GREENBONE_BOT_TOKEN }}
gpg-key: ${{ secrets.GPG_KEY }}
gpg-fingerprint: ${{ secrets.GPG_FINGERPRINT }}
gpg-passphrase: ${{ secrets.GPG_PASSPHRASE }}
strategy: calendar

0 comments on commit ec8f1af

Please sign in to comment.