chore(deps): update all (major) #981
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
| name: Build | |
| on: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - "v[0-9]+.[0-9]+.[0-9]+**" | |
| pull_request: | |
| permissions: | |
| contents: read | |
| jobs: | |
| verify-and-build-binary: | |
| runs-on: ${{ matrix.ARCH == 'amd64' && 'ubuntu-24.04' || 'ubuntu-24.04-arm' }} | |
| strategy: | |
| matrix: | |
| ARCH: [ "amd64", "arm64"] | |
| steps: | |
| - name: Check out the codebase. | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - uses: mlugg/setup-zig@d1434d08867e3ee9daa34448df10607b98908d29 # v2.2.1 | |
| - name: lint source code | |
| run: | | |
| make lint | |
| - name: Run Zig unit tests | |
| run: make zig-unit-tests ARCH=${{ matrix.ARCH }} | |
| - name: Build binary | |
| run: make dist ARCH=${{ matrix.ARCH }} | |
| - name: Run Injector integration tests | |
| run: make injector-integration-tests-for-one-architecture ARCH=${{ matrix.ARCH }} | |
| - name: Upload binary | |
| uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0 | |
| with: | |
| name: libotelinject-${{ matrix.ARCH }} | |
| path: ./dist/*.so | |
| if-no-files-found: error | |
| build-package: | |
| needs: verify-and-build-binary | |
| runs-on: ${{ matrix.ARCH == 'amd64' && 'ubuntu-24.04' || 'ubuntu-24.04-arm' }} | |
| strategy: | |
| matrix: | |
| SYS_PACKAGE: [ "deb", "rpm" ] | |
| ARCH: [ "amd64", "arm64"] | |
| steps: | |
| - name: Check out the codebase. | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| fetch-depth: 0 | |
| - name: Download binary | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| name: libotelinject-${{ matrix.ARCH }} | |
| path: ./dist | |
| - name: Determine version | |
| id: github_tag | |
| run: | | |
| TAG="${GITHUB_REF##*/}" | |
| if [[ -z "$TAG" ]] | |
| then | |
| echo "version=$TAG" >> $GITHUB_OUTPUT | |
| else | |
| echo "version=dev" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Build ${{ matrix.ARCH }} ${{ matrix.SYS_PACKAGE }} package | |
| run: make ${{ matrix.SYS_PACKAGE }}-package ARCH="${{ matrix.ARCH }}" VERSION="${{ steps.github_tag.version.version }}" | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0 | |
| with: | |
| name: opentelemetry-injector-${{ matrix.ARCH }}-${{ matrix.SYS_PACKAGE }} | |
| path: ./instrumentation/dist/*.${{ matrix.SYS_PACKAGE }} | |
| if-no-files-found: error | |
| packaging-integration-tests: | |
| needs: build-package | |
| strategy: | |
| matrix: | |
| SYS_PACKAGE: [ "deb", "rpm" ] | |
| lang: [ "java", "nodejs", "dotnet" ] | |
| ARCH: [ "amd64", "arm64" ] | |
| exclude: | |
| - lang: "dotnet" | |
| ARCH: "arm64" | |
| runs-on: ${{ matrix.ARCH == 'amd64' && 'ubuntu-24.04' || 'ubuntu-24.04-arm' }} | |
| steps: | |
| - name: Check out the codebase. | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| fetch-depth: 0 | |
| # The package integration tests do not actually need the binary, but the packaging-integration-test-... will | |
| # implicitly call "make dist", downloading the binary makes sure we do not rebuild the binary. | |
| - name: Download binary | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| name: libotelinject-${{ matrix.ARCH }} | |
| path: ./dist | |
| - name: Download package | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| name: opentelemetry-injector-${{ matrix.ARCH }}-${{ matrix.SYS_PACKAGE }} | |
| path: ./instrumentation/dist | |
| - name: Run packaging integration tests for ${{ matrix.SYS_PACKAGE }}/${{ matrix.lang }}/${{ matrix.ARCH }} | |
| run: make packaging-integration-test-${{ matrix.SYS_PACKAGE }}-${{ matrix.lang }} ARCH=${{ matrix.ARCH }} | |
| publish-stable: | |
| runs-on: ubuntu-24.04 | |
| if: startsWith(github.ref, 'refs/tags/') && github.repository == 'open-telemetry/opentelemetry-injector' | |
| needs: packaging-integration-tests | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - run: mkdir -p artifacts | |
| - name: Download artifacts | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| path: ./artifacts/ | |
| - name: Prepare release notes | |
| run: ./.github/workflows/scripts/prepare-release-notes.sh | |
| env: | |
| RELEASE_TAG: ${{ steps.github_tag.outputs.tag }} | |
| - name: debug release artifacts | |
| shell: bash | |
| run: | | |
| set -x | |
| pwd | |
| ls -la . | |
| ls -laR /home/runner/work/opentelemetry-injector/opentelemetry-injector/artifacts || true | |
| ls -laR artifacts || true | |
| - name: Release | |
| uses: softprops/action-gh-release@153bb8e04406b158c6c84fc1615b65b24149a1fe # v2.6.1 | |
| with: | |
| body_path: release-notes.md | |
| fail_on_unmatched_files: true | |
| files: | | |
| artifacts/**/* |