diff --git a/.github/badges/spec-compliance.svg b/.github/badges/spec-compliance.svg new file mode 100644 index 0000000..f6cd78a --- /dev/null +++ b/.github/badges/spec-compliance.svg @@ -0,0 +1,20 @@ + + up-spec compliance: failing + + + + + + + + + + + + + \ No newline at end of file diff --git a/.github/badges/spec-version.svg b/.github/badges/spec-version.svg new file mode 100644 index 0000000..5ee59c9 --- /dev/null +++ b/.github/badges/spec-version.svg @@ -0,0 +1,20 @@ + + up-spec: v1.6.0-alpha.7.a425a49 + + + + + + + + + + + + + \ No newline at end of file diff --git a/.github/workflows/create-badges.yaml b/.github/workflows/create-badges.yaml new file mode 100644 index 0000000..e04f822 --- /dev/null +++ b/.github/workflows/create-badges.yaml @@ -0,0 +1,65 @@ +# ******************************************************************************** +# Copyright (c) 2025 Contributors to the Eclipse Foundation +# +# See the NOTICE file(s) distributed with this work for additional +# information regarding copyright ownership. +# +# This program and the accompanying materials are made available under the +# terms of the Apache License Version 2.0 which is available at +# https://www.apache.org/licenses/LICENSE-2.0 +# +# SPDX-License-Identifier: Apache-2.0 +# ******************************************************************************* + +name: Create README badges +on: + push: + branches: [main] + +concurrency: + group: ${{ github.ref }}-${{ github.workflow }} + cancel-in-progress: true + +jobs: + spec-compliance: + uses: eclipse-uprotocol/ci-cd/.github/workflows/requirements-tracing.yaml@main + with: + env-file-suffix: "oft-current" + + create-readme-badges: + name: Create README badges + runs-on: ubuntu-latest + permissions: + contents: write + needs: + - spec-compliance + steps: + - name: check up-spec version + id: check-up-spec-version + uses: eclipse-uprotocol/ci-cd/.github/actions/check-spec-version@main + + - name: create up-spec version badge + uses: eclipse-uprotocol/ci-cd/.github/actions/create-spec-version-badge@main + with: + current-version: ${{ steps.check-up-spec-version.outputs.current-version }} + latest-version: ${{ steps.check-up-spec-version.outputs.latest-version }} + is-latest: ${{ steps.check-up-spec-version.outputs.is-latest }} + + - name: create up-spec compliance badge + uses: eclipse-uprotocol/ci-cd/.github/actions/create-spec-compliance-badge@main + with: + oft-exit-code: ${{ needs.spec-compliance.outputs.oft-exit-code }} + + - name: Commit badge + continue-on-error: true + run: | + git config --local user.email "action@github.com" + git config --local user.name "GitHub Action" + git add ".github/badges" + git commit -m "Add/Update badges" || echo "No changes to commit" + + - name: Push badge commit + uses: ad-m/github-push-action@master + if: ${{ success() }} + with: + branch: ${{ github.head_ref }} diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index ee5a04a..3fe2184 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -75,6 +75,7 @@ jobs: with: name: license-report path: dist/license/ + - name: Upload license report to release uses: svenstaro/upload-release-action@v2 id: upload_license_report @@ -90,6 +91,7 @@ jobs: with: name: tracing-report-html path: dist/tracing/ + - name: Upload requirements tracing report to release uses: svenstaro/upload-release-action@v2 id: upload_requirements_tracing_report diff --git a/README.md b/README.md index efb4a16..f493be8 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,8 @@ # Eclipse uProtocol Rust library +[![badge](.github/badges/spec-version.svg)](https://github.com/eclipse-uprotocol/up-spec) +[![badge](.github/badges/spec-compliance.svg)](https://github.com/eclipse-uprotocol/up-spec) + This is the [uProtocol v1.6.0-alpha.7 Language Library](https://github.com/eclipse-uprotocol/uprotocol-spec/blob/v1.6.0-alpha.7/languages.adoc) for the Rust programming language. The crate can be used to diff --git a/up-spec b/up-spec index 347d684..a425a49 160000 --- a/up-spec +++ b/up-spec @@ -1 +1 @@ -Subproject commit 347d68438afd9e4813193b243dc98fb42963ad99 +Subproject commit a425a49c8ab1eeab45dc21c2cb5e6fe8cc238a1f