Skip to content
Closed
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
4 changes: 0 additions & 4 deletions .github/actions/windows/build/action.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
name: "Build DLL files for Windows"
description: "Prepares the PHP build environment for the MongoDB driver"
inputs:
ref:
description: Git reference to build
required: false
php-version:
description: "PHP version to build for"
required: true
Expand All @@ -23,7 +20,6 @@ runs:
- name: Build extension
uses: php/php-windows-builder/extension@1.6.0
with:
extension-ref: ${{ inputs.ref }}
php-version: ${{ inputs.php-version }}
arch: ${{ inputs.arch }}
ts: ${{ inputs.ts }}
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/build-windows-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ jobs:
id: build-driver
uses: ./.github/actions/windows/build
with:
ref: ${{ inputs.ref }}
php-version: ${{ matrix.php-version }}
arch: ${{ matrix.arch }}
ts: ${{ matrix.ts }}
Expand Down
78 changes: 78 additions & 0 deletions .github/workflows/create-release-artifacts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: Create Release Artifacts
run-name: Create Release artifacts for ${{ github.ref_name }}
on:
push:
tags:
- "*"

jobs:
static-analysis:
name: "Run Static Analysis"
uses: ./.github/workflows/static-analysis.yml
with:
ref: ${{ github.ref }}
permissions:
security-events: write
id-token: write

package-release:
name: "Create Release Packages"
uses: ./.github/workflows/create-release-packages.yml
with:
version: ${{ github.ref_name }}
ref: ${{ github.ref }}
secrets: inherit
permissions:
id-token: write
contents: write

publish-ssdlc-assets:
needs:
- static-analysis
- package-release
environment: release
name: "Publish SSDLC Assets"
runs-on: ubuntu-latest
permissions:
security-events: read
id-token: write
contents: write

steps:
- name: "Generate token and checkout repository"
uses: mongodb-labs/drivers-github-tools/secure-checkout@v2
with:
app_id: ${{ vars.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}

# Sets the S3_ASSETS environment variable used later
- name: "Set up drivers-github-tools"
uses: mongodb-labs/drivers-github-tools/setup@v2
with:
aws_role_arn: ${{ secrets.AWS_ROLE_ARN }}
aws_region_name: ${{ vars.AWS_REGION_NAME }}
aws_secret_id: ${{ secrets.AWS_SECRET_ID }}

- name: "Remove unnecessary files"
run: rm -f ${RELEASE_ASSETS}/release_run_id.txt
shell: bash

- name: Download all release artifacts
run: gh release download ${{ github.ref_name }} --dir ${{ env.RELEASE_ASSETS }}

- name: "Generate SSDLC Reports"
uses: mongodb-labs/drivers-github-tools/full-report@v2
with:
product_name: "MongoDB PHP Driver (extension)"
release_version: ${{ github.ref_name }}
dist_filenames: "${{ env.RELEASE_ASSETS }}/*"
silk_asset_group: mongodb-php-driver-extension

- name: "Upload SBOM as release artifact"
run: gh release upload ${{ github.ref_name }} ${{ env.S3_ASSETS }}/cyclonedx.sbom.json

- name: Upload S3 assets
uses: mongodb-labs/drivers-github-tools/upload-s3-assets@v2
with:
version: ${{ github.ref_name }}
product_name: mongo-php-driver
2 changes: 1 addition & 1 deletion .github/workflows/package-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,6 @@ jobs:
uses: ./.github/workflows/build-windows-packages.yml
with:
version: ${{ inputs.version }}
ref: refs/tags/${{ inputs.version }}
ref: ${{ inputs.ref }}
upload_release_assets: true
secrets: inherit
74 changes: 0 additions & 74 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,77 +154,3 @@ jobs:
run: |
echo '🚀 Created tag and drafted release for version [${{ inputs.version }}](${{ env.RELEASE_URL }})' >> $GITHUB_STEP_SUMMARY
echo '✍️ You may now update the release notes and publish the release when ready' >> $GITHUB_STEP_SUMMARY

static-analysis:
needs: prepare-release
name: "Run Static Analysis"
uses: ./.github/workflows/static-analysis.yml
with:
ref: refs/tags/${{ inputs.version }}
permissions:
security-events: write
id-token: write

package-release:
needs: prepare-release
name: "Create Release Packages"
uses: ./.github/workflows/package-release.yml
with:
version: ${{ inputs.version }}
ref: refs/tags/${{ inputs.version }}
secrets: inherit
permissions:
id-token: write
contents: write

publish-ssdlc-assets:
needs:
- static-analysis
- package-release
environment: release
name: "Publish SSDLC Assets"
runs-on: ubuntu-latest
permissions:
security-events: read
id-token: write
contents: write

steps:
- name: "Generate token and checkout repository"
uses: mongodb-labs/drivers-github-tools/secure-checkout@v2
with:
app_id: ${{ vars.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}
ref: refs/tags/${{ inputs.version }}

# Sets the S3_ASSETS environment variable used later
- name: "Set up drivers-github-tools"
uses: mongodb-labs/drivers-github-tools/setup@v2
with:
aws_role_arn: ${{ secrets.AWS_ROLE_ARN }}
aws_region_name: ${{ vars.AWS_REGION_NAME }}
aws_secret_id: ${{ secrets.AWS_SECRET_ID }}

- name: "Remove unnecessary files"
run: rm -f ${RELEASE_ASSETS}/release_run_id.txt
shell: bash

- name: Download all release artifacts
run: gh release download ${{ inputs.version }} --dir ${{ env.RELEASE_ASSETS }}

- name: "Generate SSDLC Reports"
uses: mongodb-labs/drivers-github-tools/full-report@v2
with:
product_name: "MongoDB PHP Driver (extension)"
release_version: ${{ inputs.version }}
dist_filenames: "${{ env.RELEASE_ASSETS }}/*"
silk_asset_group: mongodb-php-driver-extension

- name: "Upload SBOM as release artifact"
run: gh release upload ${{ inputs.version }} ${{ env.S3_ASSETS }}/cyclonedx.sbom.json

- name: Upload S3 assets
uses: mongodb-labs/drivers-github-tools/upload-s3-assets@v2
with:
version: ${{ inputs.version }}
product_name: mongo-php-driver
Loading