Skip to content

Commit

Permalink
Fix: Fixing some scripts that use Gmp.types... [#535]
Browse files Browse the repository at this point in the history
Fixing some scripts that use `Gmp.types...`
  • Loading branch information
y0urself committed Oct 27, 2021
2 parents 08423f8 + 5f35099 commit d7f7eb5
Show file tree
Hide file tree
Showing 10 changed files with 152 additions and 93 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci-python.yml
Expand Up @@ -2,9 +2,9 @@ name: Build and test Python package

on:
push:
branches: [ master ]
branches: [ main ]
pull_request:
branches: [ master ]
branches: [ main ]

jobs:
linting:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codeql-analysis-python.yml
Expand Up @@ -2,9 +2,9 @@ name: "CodeQL"

on:
push:
branches: [ master ]
branches: [ main ]
pull_request:
branches: [ master ]
branches: [ main ]
paths-ignore:
- '**/*.md'
- '**/*.txt'
Expand Down
62 changes: 62 additions & 0 deletions .github/workflows/release-pontos-manually.yml
@@ -0,0 +1,62 @@
name: Release Python package with pontos

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

jobs:
build-and-release:
env:
GITHUB_USER: ${{ secrets.GREENBONE_BOT }}
GITHUB_MAIL: ${{ secrets.GREENBONE_BOT_MAIL }}
GITHUB_TOKEN: ${{ secrets.GREENBONE_BOT_TOKEN }}
GPG_KEY: ${{ secrets.GPG_KEY }}
GPG_FINGERPRINT: ${{ secrets.GPG_FINGERPRINT }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
name: Build and release with pontos
runs-on: 'ubuntu-latest'
steps:
- uses: actions/checkout@v2
with:
# because we want the git log for conventional commits, we need to fetch deeper!
fetch-depth: 0
persist-credentials: false
branch: ${{ github.event.inputs.branch }}
- 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 -CC
echo "VERSION=$(poetry run pontos-version show)" >> $GITHUB_ENV
- name: Release with pontos
run: |
poetry run pontos-release release -CC
- name: Import key from secrets
run: |
echo -e "${{ env.GPG_KEY }}" >> tmp.file
gpg \
--pinentry-mode loopback \
--passphrase ${{ env.GPG_PASSPHRASE }} \
--import tmp.file
rm tmp.file
- name: Sign with pontos-release sign
run: |
echo "Signing assets for ${{env.VERSION}}"
poetry run pontos-release sign \
--signing-key ${{ env.GPG_FINGERPRINT }} \
--passphrase ${{ env.GPG_PASSPHRASE }} \
--release-version ${{ env.VERSION }}
28 changes: 25 additions & 3 deletions .github/workflows/release-pontos.yml
Expand Up @@ -10,13 +10,18 @@ jobs:
GITHUB_USER: ${{ secrets.GREENBONE_BOT }}
GITHUB_MAIL: ${{ secrets.GREENBONE_BOT_MAIL }}
GITHUB_TOKEN: ${{ secrets.GREENBONE_BOT_TOKEN }}
GPG_KEY: ${{ secrets.GPG_KEY }}
GPG_FINGERPRINT: ${{ secrets.GPG_FINGERPRINT }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
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:
# because we want the git log for conventional commits, we need to fetch deeper!
fetch-depth: 0
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@v2
Expand All @@ -28,10 +33,27 @@ jobs:
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 }}
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
poetry run pontos-release prepare --calendar -CC
echo "VERSION=$(poetry run pontos-version show)" >> $GITHUB_ENV
- name: Release with pontos
run: |
poetry run pontos-release release
poetry run pontos-release release -CC
- name: Import key from secrets
run: |
echo -e "${{ env.GPG_KEY }}" >> tmp.file
gpg \
--pinentry-mode loopback \
--passphrase ${{ env.GPG_PASSPHRASE }} \
--import tmp.file
rm tmp.file
- name: Sign with pontos-release sign
run: |
echo "Signing assets for ${{env.VERSION}}"
poetry run pontos-release sign \
--signing-key ${{ env.GPG_FINGERPRINT }} \
--passphrase ${{ env.GPG_PASSPHRASE }} \
--release-version ${{ env.VERSION }}
8 changes: 8 additions & 0 deletions changelog.toml
@@ -0,0 +1,8 @@
commit_types = [
{ message = "^add", group = "Added"},
{ message = "^remove", group = "Removed"},
{ message = "^change", group = "Changed"},
{ message = "^fix", group = "Bug Fixes"},
]

changelog_dir = "changelog"

0 comments on commit d7f7eb5

Please sign in to comment.