diff --git a/.github/workflows/release-pontos-manually.yml b/.github/workflows/release-pontos-manually.yml new file mode 100644 index 00000000..3054f471 --- /dev/null +++ b/.github/workflows/release-pontos-manually.yml @@ -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 diff --git a/.github/workflows/release-pontos.yml b/.github/workflows/release-pontos.yml index 2a7a7ac3..597d83ce 100644 --- a/.github/workflows/release-pontos.yml +++ b/.github/workflows/release-pontos.yml @@ -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