v1.47.0 #8
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # SPDX-FileCopyrightText: 2023-2024 Sony Semiconductor Solutions Corporation | |
| # | |
| # SPDX-License-Identifier: Apache-2.0 | |
| name: Release Artifacts | |
| on: | |
| release: | |
| types: | |
| - published | |
| jobs: | |
| release-artifacts: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Get release version name | |
| id: version | |
| run: | | |
| name=$(echo "${{ github.ref_name }}" | awk -F/ '{print $NF}') | |
| echo "name=$name" >> $GITHUB_OUTPUT | |
| - name: Get last successful run id | |
| id: run-id | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: | | |
| last_run_id=$( | |
| gh run list \ | |
| --repo ${{ github.repository }} \ | |
| -w main.yml \ | |
| -c ${{ github.sha }} \ | |
| -b main \ | |
| -s completed \ | |
| --json databaseId -L 1 | jq -r .[].databaseId | |
| ) | |
| test -z $last_run_id && echo "cannot find last successful run_id" && exit 1 || echo "last_run_id=$last_run_id" && echo "last_run_id=$last_run_id" >> $GITHUB_OUTPUT | |
| - name: Download Python SDK (RaspiOS bookworm ARM64) | |
| uses: actions/download-artifact@v4 | |
| env: | |
| LAST_RUN_ID: ${{ steps.run-id.outputs.last_run_id }} | |
| with: | |
| name: python-sdk-raspios-bookworm-arm64-${{ env.LAST_RUN_ID }} | |
| run-id: ${{ env.LAST_RUN_ID }} | |
| path: dist-raspios-bookworm-arm64 | |
| github-token: ${{ github.event.repository.private && secrets.MIDOJENKINS_ARTIFACT_READ_EVP_AGENT_OSS || github.token }} | |
| - name: Download Python SDK deb (RaspiOS bookworm ARM64) | |
| uses: actions/download-artifact@v4 | |
| env: | |
| LAST_RUN_ID: ${{ steps.run-id.outputs.last_run_id }} | |
| with: | |
| name: python-sdk-deb-raspios-bookworm-arm64-${{ env.LAST_RUN_ID }} | |
| run-id: ${{ env.LAST_RUN_ID }} | |
| path: dist-raspios-bookworm-arm64 | |
| github-token: ${{ github.event.repository.private && secrets.MIDOJENKINS_ARTIFACT_READ_EVP_AGENT_OSS || github.token }} | |
| - name: Download Agent deb (RaspiOS bookworm ARM64) | |
| uses: actions/download-artifact@v4 | |
| env: | |
| LAST_RUN_ID: ${{ steps.run-id.outputs.last_run_id }} | |
| with: | |
| name: agent-deb-raspios-bookworm-arm64-${{ env.LAST_RUN_ID }} | |
| run-id: ${{ env.LAST_RUN_ID }} | |
| path: dist-raspios-bookworm-arm64 | |
| github-token: ${{ github.event.repository.private && secrets.MIDOJENKINS_ARTIFACT_READ_EVP_AGENT_OSS || github.token }} | |
| - name: Download Python SDK (Ubuntu noble ARM64) | |
| uses: actions/download-artifact@v4 | |
| env: | |
| LAST_RUN_ID: ${{ steps.run-id.outputs.last_run_id }} | |
| with: | |
| name: python-sdk-ubuntu-noble-arm64-${{ env.LAST_RUN_ID }} | |
| run-id: ${{ env.LAST_RUN_ID }} | |
| path: dist-ubuntu-noble-arm64 | |
| github-token: ${{ github.event.repository.private && secrets.MIDOJENKINS_ARTIFACT_READ_EVP_AGENT_OSS || github.token }} | |
| - name: Download Python SDK deb (Ubuntu noble ARM64) | |
| uses: actions/download-artifact@v4 | |
| env: | |
| LAST_RUN_ID: ${{ steps.run-id.outputs.last_run_id }} | |
| with: | |
| name: python-sdk-deb-ubuntu-noble-arm64-${{ env.LAST_RUN_ID }} | |
| run-id: ${{ env.LAST_RUN_ID }} | |
| path: dist-ubuntu-noble-arm64 | |
| github-token: ${{ github.event.repository.private && secrets.MIDOJENKINS_ARTIFACT_READ_EVP_AGENT_OSS || github.token }} | |
| - name: Download Agent deb (Ubuntu noble ARM64) | |
| uses: actions/download-artifact@v4 | |
| env: | |
| LAST_RUN_ID: ${{ steps.run-id.outputs.last_run_id }} | |
| with: | |
| name: agent-deb-ubuntu-noble-arm64-${{ env.LAST_RUN_ID }} | |
| run-id: ${{ env.LAST_RUN_ID }} | |
| path: dist-ubuntu-noble-arm64 | |
| github-token: ${{ github.event.repository.private && secrets.MIDOJENKINS_ARTIFACT_READ_EVP_AGENT_OSS || github.token }} | |
| - name: Download Python SDK (Ubuntu noble AMD64) | |
| uses: actions/download-artifact@v4 | |
| env: | |
| LAST_RUN_ID: ${{ steps.run-id.outputs.last_run_id }} | |
| with: | |
| name: python-sdk-ubuntu-noble-amd64-${{ env.LAST_RUN_ID }} | |
| run-id: ${{ env.LAST_RUN_ID }} | |
| path: dist-ubuntu-noble-amd64 | |
| github-token: ${{ github.event.repository.private && secrets.MIDOJENKINS_ARTIFACT_READ_EVP_AGENT_OSS || github.token }} | |
| - name: Download Python SDK deb (Ubuntu noble AMD64) | |
| uses: actions/download-artifact@v4 | |
| env: | |
| LAST_RUN_ID: ${{ steps.run-id.outputs.last_run_id }} | |
| with: | |
| name: python-sdk-deb-ubuntu-noble-amd64-${{ env.LAST_RUN_ID }} | |
| run-id: ${{ env.LAST_RUN_ID }} | |
| path: dist-ubuntu-noble-amd64 | |
| github-token: ${{ github.event.repository.private && secrets.MIDOJENKINS_ARTIFACT_READ_EVP_AGENT_OSS || github.token }} | |
| - name: Download Agent deb (Ubuntu noble AMD64) | |
| uses: actions/download-artifact@v4 | |
| env: | |
| LAST_RUN_ID: ${{ steps.run-id.outputs.last_run_id }} | |
| with: | |
| name: agent-deb-ubuntu-noble-amd64-${{ env.LAST_RUN_ID }} | |
| run-id: ${{ env.LAST_RUN_ID }} | |
| path: dist-ubuntu-noble-amd64 | |
| github-token: ${{ github.event.repository.private && secrets.MIDOJENKINS_ARTIFACT_READ_EVP_AGENT_OSS || github.token }} | |
| - name: Download SBOM | |
| uses: actions/download-artifact@v4 | |
| env: | |
| LAST_RUN_ID: ${{ steps.run-id.outputs.last_run_id }} | |
| with: | |
| pattern: sbom-agent-*${{ env.LAST_RUN_ID }} | |
| merge-multiple: false | |
| run-id: ${{ env.LAST_RUN_ID }} | |
| path: sbom | |
| github-token: ${{ github.event.repository.private && secrets.MIDOJENKINS_ARTIFACT_READ_EVP_AGENT_OSS || github.token }} | |
| - name: Rename deb artifacts | |
| run: | | |
| set -x | |
| for deb in dist-ubuntu-noble-*/*.deb; do | |
| mv $deb $(echo $deb | sed -E 's/(.*)_([^_]*).deb/\1-ubuntu-noble_\2.deb/'); | |
| done | |
| for deb in dist-raspios-bookworm-*/*.deb; do | |
| mv $deb $(echo $deb | sed -E 's/(.*)_([^_]*).deb/\1-raspios-bookworm_\2.deb/'); | |
| done | |
| - name: Create a zip for sbom | |
| run: | | |
| set -x | |
| cd sbom | |
| for dir in sbom-agent*; do | |
| sbom_name="${dir%-*}" | |
| zip -r ${sbom_name}-${{ steps.version.outputs.name }}.zip $dir; | |
| done | |
| - name: List files in dist-ubuntu-noble-amd64 | |
| run: ls -la dist-ubuntu-noble-amd64 | |
| - name: List files in dist-ubuntu-noble-arm64 | |
| run: ls -la dist-ubuntu-noble-arm64 | |
| - name: List files in dist-raspios-bookworm-arm64 | |
| run: ls -la dist-raspios-bookworm-arm64 | |
| - name: Push artifacts to release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| prerelease: false | |
| files: | | |
| dist-*/*.deb | |
| dist-*/*.whl | |
| sbom/*.zip |