@@ -58,14 +58,30 @@ jobs:
5858 latest_release_tag : ${{ needs.check_release.outputs.latest_release_tag }}
5959 run : echo "$latest_release_tag" > TAG
6060
61+ - name : Pull graphql schemas
62+ env :
63+ latest_release_tag : ${{ needs.check_release.outputs.latest_release_tag }}
64+ run : |
65+ # TODO(@BolajiOlajide): Remove this when we start pushing schemas on every releaase.
66+ normalized_version=$(echo "$latest_release_tag" | awk -F. '{print $1"."$2".0"}' | sed 's/^v//; s/^/v/')
67+ file_name="gql_schema_${normalized_version}.tar.gz"
68+
69+ # Download the tar file using curl
70+ curl -O "https://storage.googleapis.com/graphql_schema/$file_name"
71+
72+ # extract tar file
73+ tar -xvf "$file_name" -C gql
74+
75+ # delete the tar
76+ rm -rf "$file_name"
77+
6178 - name : Pull database migrations
6279 env :
6380 latest_release_tag : ${{ needs.check_release.outputs.latest_release_tag }}
6481 run : |
65- # TODO: Remove this when we start pushing schemas on every releaase.
82+ # TODO(@BolajiOlajide) : Remove this when we start pushing schemas on every releaase.
6683 normalized_version=$(echo "$latest_release_tag" | awk -F. '{print $1"."$2".0"}' | sed 's/^v//; s/^/v/')
6784 file_name="migrations-${normalized_version}.tar.gz"
68- echo "$file_name"
6985
7086 # Download the tar file using curl
7187 curl -O "https://storage.googleapis.com/schemas-migrations/migrations/$file_name"
@@ -82,13 +98,16 @@ jobs:
8298 run : |
8399 git config user.name github-actions
84100 git config user.email github-actions@github.com
101+
85102 git add migrations
86103 git add TAG
104+ git add gql
105+
87106 git commit -m "Add artifacts for $latest_release_tag"
88107
89- # - name: Push changes
90- # run: |
91- # git push origin main
108+ - name : Push changes
109+ run : |
110+ git push origin main
92111
93112 # - name: Create new tag
94113 # env:
0 commit comments