From 33670ae57e37a6af868e9f0619162ca5b33b9a37 Mon Sep 17 00:00:00 2001 From: Ludovic Ortega Date: Fri, 15 Nov 2024 18:59:59 +0100 Subject: [PATCH] chore(pulumi): auto-applied workflow this file was auto-applied from pulumi located here: - https://github.com/octodns-infomaniak/.github Signed-off-by: Ludovic Ortega --- .github/workflows/release.yml | 53 +++++++++++++++++++---------------- 1 file changed, 29 insertions(+), 24 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bcfbee3..1202e42 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,29 +6,35 @@ on: - '*' permissions: contents: write - id-token: write - -jobs: - changelog: - name: Create release as draft with changelog +jobs: +changelog: + name: Generate changelog + runs-on: ubuntu-latest + outputs: + release_body: ${{ steps.git-cliff.outputs.content }} + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Generate a changelog + id: git-cliff + uses: orhun/git-cliff-action@v4 + with: + config: .github/cliff.toml + args: -vv --current + env: + OUTPUT: CHANGELOG.md + GITHUB_REPO: ${{ github.repository }} + create_draft_release: + name: Create release as draft runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Generate a changelog - uses: orhun/git-cliff-action@v4 - with: - config: .github/cliff.toml - args: --current - env: - OUTPUT: CHANGELOG.md - GITHUB_REPO: ${{ github.repository }} - - name: Create release - run: gh release create ${{ github.ref_name }} -F CHANGELOG.md --draft - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + needs: [changelog] + - name: Create release as draft + run: gh release create ${{ github.ref_name }} -F ${{ needs.changelog.outputs.release_body }}--draft + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + package: name: Package @@ -49,11 +55,10 @@ jobs: uv build - name: Publish package distributions to PyPI uses: pypa/gh-action-pypi-publish@release/v1 - - publish: + publish_release: name: Publish release runs-on: ubuntu-latest - needs: [changelog, package] + needs: [create_draft_release, changelog, package] steps: - name: Checkout uses: actions/checkout@v4