From e1702f68d7feaf9898931a440dbd1671141c8e31 Mon Sep 17 00:00:00 2001 From: nitro-neal <5314059+nitro-neal@users.noreply.github.com> Date: Fri, 27 Sep 2024 13:24:31 -0500 Subject: [PATCH] Add deprecation warning to README (#341) * Add deprecation warning to README * update * update * update github actions --- .github/workflows/ci.yml | 241 +++++++++++++------------- .github/workflows/release.yml | 306 +++++++++++++++++----------------- README.md | 9 +- 3 files changed, 283 insertions(+), 273 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 90fe5688a..839d8481c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -52,123 +52,124 @@ jobs: # Maven "test" lifecycle will build and test only on MacOS mvn test - # On Ubuntu we build, test, verify, and deploy: Code Coverage, Test Vectors, and SNAPSHOT artifacts to TBD Artifactory - build-test-deploy-snapshot-ubuntu: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - submodules: true - - # https://cashapp.github.io/hermit/usage/ci/ - - name: Init Hermit - uses: cashapp/activate-hermit@v1 - with: - cache: true - - - name: hash test inputs - run: | - if ! which sha256sum; then brew install coreutils; fi - sha256sum $(find test-vectors -name '*.json') > test-vector-hashes.txt - - - name: Resolve Snapshot Version - id: resolve_version - run: | - # Version resolution: use provided - if [ -n "${{ github.event.inputs.version }}" ]; then - resolvedVersion=${{ github.event.inputs.version }} - # Otherwise, construct a version for deployment in form X.Y.Z-commit-$shortSHA-SNAPSHOT - else - longSHA=$(git rev-parse --verify HEAD) - shortSHA=$(echo "${longSHA:0:7}") - resolvedVersion="commit-$shortSHA-SNAPSHOT" - echo "Requesting deployment as version: $resolvedVersion" - fi - - # Postcondition check; only allow this to proceed if we have a version ending in "-SNAPSHOT" - if [[ ! "$resolvedVersion" =~ -SNAPSHOT$ ]]; then - echo "Error: The version does not end with \"-SNAPSHOT\": $resolvedVersion" - exit 1 - fi - - echo "Resolved SNAPSHOT Version: $resolvedVersion" - echo "resolved_version=$resolvedVersion" >> $GITHUB_OUTPUT - - - name: Build, Test, and Deploy to TBD Artifactory - run: | - # Set newly resolved version in POM config - mvn \ - versions:set \ - --batch-mode \ - -DnewVersion=${{ steps.resolve_version.outputs.resolved_version }} - - # Only attempt to publish artifact if we have credentials - if [ -n "${{ secrets.ARTIFACTORY_PASSWORD }}" ]; then - # Maven deploy lifecycle will build, run tests, verify, sign, and deploy - mvn deploy --batch-mode --settings .maven_settings.xml -P sign-artifacts - else - # Otherwise, Maven verify lifecycle will build, run tests, and verify - mvn verify --batch-mode - fi - - env: - ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }} - ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }} - SIGN_KEY_PASS: ${{ secrets.GPG_SECRET_PASSPHRASE }} - SIGN_KEY: ${{ secrets.GPG_SECRET_KEY }} - - - name: Upload Vector test results - uses: actions/upload-artifact@v3 - with: - name: test-results - path: | - **/target/surefire-reports/*TestVectors*.xml - test-vector-hashes.txt - - - name: Upload coverage reports to Codecov - uses: codecov/codecov-action@v4 - with: - token: ${{ secrets.CODECOV_TOKEN }} - verbose: true - flags: ${{ runner.os }} - - - name: Upload JUnit tests report - uses: actions/upload-artifact@v3 - with: - name: tests-report-junit - path: | - **/target/surefire-reports/*.xml - - - name: Generate an access token to trigger downstream repo - uses: actions/create-github-app-token@2986852ad836768dfea7781f31828eb3e17990fa # v1.6.2 - id: generate_token - if: github.ref == 'refs/heads/main' - with: - app-id: ${{ secrets.CICD_ROBOT_GITHUB_APP_ID }} - private-key: ${{ secrets.CICD_ROBOT_GITHUB_APP_PRIVATE_KEY }} - owner: TBD54566975 - repositories: sdk-report-runner - - - name: Trigger sdk-report-runner report build - if: github.ref == 'refs/heads/main' - run: | - curl -L \ - -H "Authorization: Bearer ${APP_TOKEN}" \ - -H "X-GitHub-Api-Version: 2022-11-28" \ - -H "Content-Type: application/json" \ - --fail \ - --data '{"ref": "main"}' \ - https://api.github.com/repos/TBD54566975/sdk-report-runner/actions/workflows/build-report.yaml/dispatches - env: - APP_TOKEN: ${{ steps.generate_token.outputs.token }} - - # Ensure both MacOS and Ubuntu build/test jobs succeeded - confirm-successful-build-and-tests: - # Wait on both jobs to succeed - needs: [build-test-macos, build-test-deploy-snapshot-ubuntu] - runs-on: ubuntu-latest - - steps: - - name: Log Success - run: | - echo "Builds for MacOS and Ubuntu succeeded." + # Depricated! This is now done in web5-rs kotlin rust bound code + # # On Ubuntu we build, test, verify, and deploy: Code Coverage, Test Vectors, and SNAPSHOT artifacts to TBD Artifactory + # build-test-deploy-snapshot-ubuntu: + # runs-on: ubuntu-latest + # steps: + # - uses: actions/checkout@v4 + # with: + # submodules: true + + # # https://cashapp.github.io/hermit/usage/ci/ + # - name: Init Hermit + # uses: cashapp/activate-hermit@v1 + # with: + # cache: true + + # - name: hash test inputs + # run: | + # if ! which sha256sum; then brew install coreutils; fi + # sha256sum $(find test-vectors -name '*.json') > test-vector-hashes.txt + + # - name: Resolve Snapshot Version + # id: resolve_version + # run: | + # # Version resolution: use provided + # if [ -n "${{ github.event.inputs.version }}" ]; then + # resolvedVersion=${{ github.event.inputs.version }} + # # Otherwise, construct a version for deployment in form X.Y.Z-commit-$shortSHA-SNAPSHOT + # else + # longSHA=$(git rev-parse --verify HEAD) + # shortSHA=$(echo "${longSHA:0:7}") + # resolvedVersion="commit-$shortSHA-SNAPSHOT" + # echo "Requesting deployment as version: $resolvedVersion" + # fi + + # # Postcondition check; only allow this to proceed if we have a version ending in "-SNAPSHOT" + # if [[ ! "$resolvedVersion" =~ -SNAPSHOT$ ]]; then + # echo "Error: The version does not end with \"-SNAPSHOT\": $resolvedVersion" + # exit 1 + # fi + + # echo "Resolved SNAPSHOT Version: $resolvedVersion" + # echo "resolved_version=$resolvedVersion" >> $GITHUB_OUTPUT + + # - name: Build, Test, and Deploy to TBD Artifactory + # run: | + # # Set newly resolved version in POM config + # mvn \ + # versions:set \ + # --batch-mode \ + # -DnewVersion=${{ steps.resolve_version.outputs.resolved_version }} + + # # Only attempt to publish artifact if we have credentials + # if [ -n "${{ secrets.ARTIFACTORY_PASSWORD }}" ]; then + # # Maven deploy lifecycle will build, run tests, verify, sign, and deploy + # mvn deploy --batch-mode --settings .maven_settings.xml -P sign-artifacts + # else + # # Otherwise, Maven verify lifecycle will build, run tests, and verify + # mvn verify --batch-mode + # fi + + # env: + # ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }} + # ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }} + # SIGN_KEY_PASS: ${{ secrets.GPG_SECRET_PASSPHRASE }} + # SIGN_KEY: ${{ secrets.GPG_SECRET_KEY }} + + # - name: Upload Vector test results + # uses: actions/upload-artifact@v3 + # with: + # name: test-results + # path: | + # **/target/surefire-reports/*TestVectors*.xml + # test-vector-hashes.txt + + # - name: Upload coverage reports to Codecov + # uses: codecov/codecov-action@v4 + # with: + # token: ${{ secrets.CODECOV_TOKEN }} + # verbose: true + # flags: ${{ runner.os }} + + # - name: Upload JUnit tests report + # uses: actions/upload-artifact@v3 + # with: + # name: tests-report-junit + # path: | + # **/target/surefire-reports/*.xml + + # - name: Generate an access token to trigger downstream repo + # uses: actions/create-github-app-token@2986852ad836768dfea7781f31828eb3e17990fa # v1.6.2 + # id: generate_token + # if: github.ref == 'refs/heads/main' + # with: + # app-id: ${{ secrets.CICD_ROBOT_GITHUB_APP_ID }} + # private-key: ${{ secrets.CICD_ROBOT_GITHUB_APP_PRIVATE_KEY }} + # owner: TBD54566975 + # repositories: sdk-report-runner + + # - name: Trigger sdk-report-runner report build + # if: github.ref == 'refs/heads/main' + # run: | + # curl -L \ + # -H "Authorization: Bearer ${APP_TOKEN}" \ + # -H "X-GitHub-Api-Version: 2022-11-28" \ + # -H "Content-Type: application/json" \ + # --fail \ + # --data '{"ref": "main"}' \ + # https://api.github.com/repos/TBD54566975/sdk-report-runner/actions/workflows/build-report.yaml/dispatches + # env: + # APP_TOKEN: ${{ steps.generate_token.outputs.token }} + + # # Ensure both MacOS and Ubuntu build/test jobs succeeded + # confirm-successful-build-and-tests: + # # Wait on both jobs to succeed + # needs: [build-test-macos, build-test-deploy-snapshot-ubuntu] + # runs-on: ubuntu-latest + + # steps: + # - name: Log Success + # run: | + # echo "Builds for MacOS and Ubuntu succeeded." diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 64023b1cc..288f65292 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,152 +1,154 @@ -# Kicks off the release process: -# -# * Sets release version -# * Builds -# * Tests -# * Creates artifacts for binaries and sources -# * Signs artifacts -# * Uploads artifacts to TBD Artifactory -# * Tags git with release number "v$version" -# * Keeps development version in the pom.xml to 0.0.0-main-SNAPSHOT -# * Pushes changes to git -# * Triggers job to: -# * Build from tag and upload to Maven Central -# * Create GitHub Release "v$version" -# * Publish API Docs - -name: Release and Publish -on: - workflow_dispatch: - inputs: - version: - description: '(Required) The version to release. Must be a real version, not a SNAPSHOT (ie. ending in "-SNAPSHOT"). For example "1.0.0", "1.0.0-alpha-1".' - required: true -jobs: - release-publish-tbd-artifactory: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - submodules: true - token: ${{ secrets.TBD_RELEASE_GITHUB_PERSONAL_ACCESS_TOKEN }} - - # https://cashapp.github.io/hermit/usage/ci/ - - name: Init Hermit - uses: cashapp/activate-hermit@v1 - - - uses: actions/cache@v3 - with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-maven- - - # Used in writing commits in the release process - - name: Set Git Config - run: | - git config user.name "tbd-releases" - git config user.email "releases@tbd.email" - - # This will set versions, git tag, sign, and publish to TBD Artifactory. Does not release to Maven Central. - - name: Release and Publish to TBD Artifactory - run: | - - # Get the required provided version - version=${{ github.event.inputs.version }} - # Precondition check; do not allow this to proceed if a version ending in "-SNAPSHOT" was specified - if [[ $version =~ -SNAPSHOT$ ]]; then - echo "Error: The version for release must not end with \"-SNAPSHOT\": $version" - exit 1 - fi - - # Get the existing version from the POM and set it to the nextVersion, keeping the POM effectively versionless - nextVersion=$(grep -oPm1 "(?<=)[^<]+" pom.xml) - if [[ -z $nextVersion ]]; then - echo "Error: Could not find a version in the pom.xml" - exit 1 - fi - - echo "Version to be released: $version" - echo "Setting next development version back to original in pom.xml: $nextVersion" - - mvn -e \ - release:prepare \ - release:perform \ - --batch-mode \ - --settings .maven_settings.xml \ - -DreleaseVersion=$version \ - -DdevelopmentVersion=$nextVersion \ - -P sign-artifacts - env: - ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }} - ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }} - TBD_RELEASE_GITHUB_PERSONAL_ACCESS_TOKEN: ${{ secrets.TBD_RELEASE_GITHUB_PERSONAL_ACCESS_TOKEN }} - SIGN_KEY_PASS: ${{ secrets.GPG_SECRET_PASSPHRASE }} - SIGN_KEY: ${{ secrets.GPG_SECRET_KEY }} - - publish-publicly: - needs: release-publish-tbd-artifactory - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - ref: v${{ github.event.inputs.version }} - submodules: true - - # https://cashapp.github.io/hermit/usage/ci/ - - name: Init Hermit - uses: cashapp/activate-hermit@v1 - - - uses: actions/cache@v3 - with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-maven- - - - name: Build, Test, and Deploy to Maven Central - run: | - echo $(git describe --tags) - # Maven deploy lifecycle will build, run tests, verify, sign, and deploy - mvn \ - deploy \ - -P ossrh,sign-artifacts \ - --batch-mode \ - --settings .maven_settings.xml - env: - SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} - SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} - SIGN_KEY_PASS: ${{ secrets.GPG_SECRET_PASSPHRASE }} - SIGN_KEY: ${{ secrets.GPG_SECRET_KEY }} - - - name: Download Dokka CLI and Build HTML APIDocs - working-directory: . - run: ./scripts/dokka.sh - - name: Upload artifact - uses: actions/upload-artifact@v2 - with: - name: docs - path: target/apidocs - - - name: Create GitHub Release - uses: softprops/action-gh-release@v1 - with: - tag_name: v${{ github.event.inputs.version }} - draft: false - prerelease: false - generate_release_notes: true - - deploy-api-docs: - runs-on: ubuntu-latest - needs: [publish-publicly] - steps: - - uses: actions/download-artifact@v2 - with: - path: public - - name: Deploy - uses: peaceiris/actions-gh-pages@v3 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - keep_files: true - publish_dir: ./public - full_commit_message: Publish documentation to GitHub pages +# Depricated! This is now done in web5-rs kotlin rust bound code + +# # Kicks off the release process: +# # +# # * Sets release version +# # * Builds +# # * Tests +# # * Creates artifacts for binaries and sources +# # * Signs artifacts +# # * Uploads artifacts to TBD Artifactory +# # * Tags git with release number "v$version" +# # * Keeps development version in the pom.xml to 0.0.0-main-SNAPSHOT +# # * Pushes changes to git +# # * Triggers job to: +# # * Build from tag and upload to Maven Central +# # * Create GitHub Release "v$version" +# # * Publish API Docs + +# name: Release and Publish +# on: +# workflow_dispatch: +# inputs: +# version: +# description: '(Required) The version to release. Must be a real version, not a SNAPSHOT (ie. ending in "-SNAPSHOT"). For example "1.0.0", "1.0.0-alpha-1".' +# required: true +# jobs: +# release-publish-tbd-artifactory: +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v4 +# with: +# submodules: true +# token: ${{ secrets.TBD_RELEASE_GITHUB_PERSONAL_ACCESS_TOKEN }} + +# # https://cashapp.github.io/hermit/usage/ci/ +# - name: Init Hermit +# uses: cashapp/activate-hermit@v1 + +# - uses: actions/cache@v3 +# with: +# path: ~/.m2/repository +# key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} +# restore-keys: | +# ${{ runner.os }}-maven- + +# # Used in writing commits in the release process +# - name: Set Git Config +# run: | +# git config user.name "tbd-releases" +# git config user.email "releases@tbd.email" + +# # This will set versions, git tag, sign, and publish to TBD Artifactory. Does not release to Maven Central. +# - name: Release and Publish to TBD Artifactory +# run: | + +# # Get the required provided version +# version=${{ github.event.inputs.version }} +# # Precondition check; do not allow this to proceed if a version ending in "-SNAPSHOT" was specified +# if [[ $version =~ -SNAPSHOT$ ]]; then +# echo "Error: The version for release must not end with \"-SNAPSHOT\": $version" +# exit 1 +# fi + +# # Get the existing version from the POM and set it to the nextVersion, keeping the POM effectively versionless +# nextVersion=$(grep -oPm1 "(?<=)[^<]+" pom.xml) +# if [[ -z $nextVersion ]]; then +# echo "Error: Could not find a version in the pom.xml" +# exit 1 +# fi + +# echo "Version to be released: $version" +# echo "Setting next development version back to original in pom.xml: $nextVersion" + +# mvn -e \ +# release:prepare \ +# release:perform \ +# --batch-mode \ +# --settings .maven_settings.xml \ +# -DreleaseVersion=$version \ +# -DdevelopmentVersion=$nextVersion \ +# -P sign-artifacts +# env: +# ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }} +# ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }} +# TBD_RELEASE_GITHUB_PERSONAL_ACCESS_TOKEN: ${{ secrets.TBD_RELEASE_GITHUB_PERSONAL_ACCESS_TOKEN }} +# SIGN_KEY_PASS: ${{ secrets.GPG_SECRET_PASSPHRASE }} +# SIGN_KEY: ${{ secrets.GPG_SECRET_KEY }} + +# publish-publicly: +# needs: release-publish-tbd-artifactory +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v4 +# with: +# ref: v${{ github.event.inputs.version }} +# submodules: true + +# # https://cashapp.github.io/hermit/usage/ci/ +# - name: Init Hermit +# uses: cashapp/activate-hermit@v1 + +# - uses: actions/cache@v3 +# with: +# path: ~/.m2/repository +# key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} +# restore-keys: | +# ${{ runner.os }}-maven- + +# - name: Build, Test, and Deploy to Maven Central +# run: | +# echo $(git describe --tags) +# # Maven deploy lifecycle will build, run tests, verify, sign, and deploy +# mvn \ +# deploy \ +# -P ossrh,sign-artifacts \ +# --batch-mode \ +# --settings .maven_settings.xml +# env: +# SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} +# SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} +# SIGN_KEY_PASS: ${{ secrets.GPG_SECRET_PASSPHRASE }} +# SIGN_KEY: ${{ secrets.GPG_SECRET_KEY }} + +# - name: Download Dokka CLI and Build HTML APIDocs +# working-directory: . +# run: ./scripts/dokka.sh +# - name: Upload artifact +# uses: actions/upload-artifact@v2 +# with: +# name: docs +# path: target/apidocs + +# - name: Create GitHub Release +# uses: softprops/action-gh-release@v1 +# with: +# tag_name: v${{ github.event.inputs.version }} +# draft: false +# prerelease: false +# generate_release_notes: true + +# deploy-api-docs: +# runs-on: ubuntu-latest +# needs: [publish-publicly] +# steps: +# - uses: actions/download-artifact@v2 +# with: +# path: public +# - name: Deploy +# uses: peaceiris/actions-gh-pages@v3 +# with: +# github_token: ${{ secrets.GITHUB_TOKEN }} +# keep_files: true +# publish_dir: ./public +# full_commit_message: Publish documentation to GitHub pages diff --git a/README.md b/README.md index 5880e56c2..36c4ec8d0 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,11 @@ -# web5-sdk-kotlin +# ⚠️ Deprecated Repository⚠️ +This repository is deprecated. + +The last version of tbdex-kt that used this repository is `2.0.1` + +Starting from version 4.0.0, the project has transitioned to using the [web5-rs Kotlin bindings repository](https://github.com/TBD54566975/web5-rs/tree/main/bound/kt). + +## web5-sdk-kotlin [![License](https://img.shields.io/github/license/TBD54566975/web5-kt)](https://github.com/TBD54566975/web5-kt/blob/main/LICENSE) [![SDK Kotlin CI](https://github.com/TBD54566975/web5-kt/actions/workflows/ci.yml/badge.svg)](https://github.com/TBD54566975/web5-kt/actions/workflows/ci.yml) [![Coverage](https://img.shields.io/codecov/c/gh/tbd54566975/web5-kt/main?logo=codecov&logoColor=FFFFFF&style=flat-square&token=YI87CKF1LI)](https://codecov.io/github/TBD54566975/web5-kt)