Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 16 additions & 14 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,27 @@ permissions:
contents: read

jobs:
build-distribution:
permissions:
attestations: write
id-token: write
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/build-distribution
- name: generate build provenance
uses: actions/attest-build-provenance@e8998f949152b193b063cb0ec769d69d929409be # v2.4.0
with:
subject-path: "${{ github.workspace }}/build/dist/elastic-apm-python-lambda-layer.zip"

test:
uses: ./.github/workflows/test-release.yml
needs: build-distribution
with:
full-matrix: true
enabled: ${{ startsWith(github.ref, 'refs/tags') }}
skip-build: true

packages:
permissions:
Expand Down Expand Up @@ -56,20 +72,6 @@ jobs:
with:
repository-url: https://test.pypi.org/legacy/

build-distribution:
permissions:
attestations: write
id-token: write
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/build-distribution
- name: generate build provenance
uses: actions/attest-build-provenance@e8998f949152b193b063cb0ec769d69d929409be # v2.4.0
with:
subject-path: "${{ github.workspace }}/build/dist/elastic-apm-python-lambda-layer.zip"

publish-lambda-layers:
permissions:
contents: read
Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/test-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ on:
description: "Whether to run the workfow"
required: true
type: boolean
skip-build:
description: "Skip the build distribution step"
required: false
type: boolean
default: false
workflow_dispatch:
inputs:
full-matrix:
Expand All @@ -25,13 +30,19 @@ on:
description: "Whether to run the workfow"
required: true
type: boolean
skip-build:
description: "Skip the build distribution step"
required: false
type: boolean
default: false

jobs:
test:
if: ${{ inputs.enabled }}
uses: ./.github/workflows/test.yml
with:
full-matrix: ${{ inputs.full-matrix }}
skip-build: ${{ inputs.skip-build }}

run-if-disabled:
if: ${{ ! inputs.enabled }}
Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ on:
description: "The git ref of elastic/apm-agent-python to run test workflow from."
required: false
type: string
skip-build:
description: "Skip the build distribution step"
required: false
type: boolean
default: false
pull_request:
paths-ignore:
- "**/*.md"
Expand All @@ -29,12 +34,18 @@ on:
description: "Run the full matrix"
required: true
type: boolean
skip-build:
description: "Skip the build distribution step"
required: false
type: boolean
default: false

permissions:
contents: read

jobs:
build-distribution:
if: ${{ !inputs.skip-build }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down
Loading