diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index a852f9d..f65c98b 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -100,4 +100,34 @@ jobs: body: ${{ steps.changelog-reader.outputs.changes }} files: | ./connector-definition/dist/connector-definition.tgz - fail_on_unmatched_files: true \ No newline at end of file + fail_on_unmatched_files: true + + - name: Update ndc-hub + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + CONNECTOR_NAME: turso + run: | + # Clone ndc-hub repository + git clone https://github.com/hasura/ndc-hub.git + cd ndc-hub + + # Create a new branch + git checkout -b update-${{ env.CONNECTOR_NAME }}-connector-v${{ steps.get-version.outputs.tagged_version }} + + cd registry/${{ env.CONNECTOR_NAME }} + + # Update metadata.json + jq --arg version "${{ steps.get-version.outputs.tagged_version }}" \ + --arg version_tag "v${{ steps.get-version.outputs.tagged_version }}" \ + '.packages += [{"version": $version}] | + .source_code.version += [{"tag": $version_tag}]' \ + metadata.json > tmp.json && mv tmp.json metadata.json + + # Commit changes + git config user.name "GitHub Action" + git config user.email "action@github.com" + git add metadata.json + git commit -m "Update ${{ env.CONNECTOR_NAME }} connector metadata to version ${{ steps.get-version.outputs.tagged_version }}" + + # Push changes + git push https://${{ secrets.GITHUB_TOKEN }}@github.com/hasura/ndc-hub.git HEAD:update-${{ env.CONNECTOR_NAME }}-connector-v${{ steps.get-version.outputs.tagged_version }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 256eb64..25c5d18 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,9 @@ This changelog documents changes between release tags. ## [Unreleased] Upcoming changes for the next versioned release. +## [0.0.18] +* Attempt to integrate push to ndc-hub workflow + ## [0.0.17] * Bump version diff --git a/package-lock.json b/package-lock.json index 9dcb098..cfe845f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "ndc-turso", - "version": "0.0.17", + "version": "0.0.18", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "ndc-turso", - "version": "0.0.17", + "version": "0.0.18", "dependencies": { "@hasura/ndc-sdk-typescript": "^5.2.0", "@json-schema-tools/meta-schema": "^1.7.0", diff --git a/package.json b/package.json index 267f702..93bd529 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ndc-turso", - "version": "0.0.17", + "version": "0.0.18", "main": "index.js", "author": "Tristen Harr", "scripts": {