@@ -10,31 +10,32 @@ jobs:
10
10
name : Check Saleor release and update types
11
11
runs-on : ubuntu-latest
12
12
steps :
13
- - name : Checkout repository
14
- uses : actions/checkout@v4
15
-
16
13
- name : Get latest release info
17
14
id : release
18
15
run : |
19
16
echo "Fetching latest release info..."
20
- latest_release=$(curl -s https://api.github.com/repos/saleor/saleor/releases/latest )
17
+ latest_release=$(curl -s https://api.github.com/repos/saleor/saleor/releases/124548972 )
21
18
echo "tag=$(echo $latest_release | jq -r '.tag_name')" >> "$GITHUB_OUTPUT"
19
+ echo "schema_url=$(echo $latest_release | jq -r '.assets[] | select(.name == "schema.graphql") | .url')" >> "$GITHUB_OUTPUT"
22
20
echo "has_schema=$(echo $latest_release | jq -e '.assets[] | select(.name == "schema.graphql") | length > 0')" >> "$GITHUB_OUTPUT"
23
21
24
22
- name : Download schema.graphql
25
23
run : |
26
24
if [[ "${{ steps.release.outputs.has_schema }}" == "true" ]]; then
27
25
echo "schema.graphql is attached to the ${{ steps.release.outputs.tag }} release, updating..."
26
+
27
+ curl --output schema.graphql \
28
+ --url ${{ steps.release.outputs.schema_url }} \
29
+ --header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \
30
+ --header "Accept: application/octet-stream" \
31
+ --location
28
32
else
29
33
echo "schema.graphql is not attached to the ${{ steps.release.outputs.tag }} release, exiting..."
30
34
exit 1
31
35
fi
32
36
33
- -
uses :
robinraju/[email protected]
34
- with :
35
- repository : " saleor/saleor"
36
- latest : true
37
- fileName : " schema.graphql"
37
+ - name : Checkout repository
38
+ uses : actions/checkout@v4
38
39
39
40
- name : Get PNPM version from package.json
40
41
id : pnpm-version
0 commit comments