3939
4040 - name : Check version difference
4141 run : |
42- if [ $VERSION_BEFORE = $VERSION_AFTER ]; then
42+ if [ ${{ env. VERSION_BEFORE }} = ${{ env. VERSION_AFTER }} ]; then
4343 echo 0 > has-new-release
4444 else
4545 echo 1 > has-new-release
@@ -71,24 +71,24 @@ jobs:
7171 run : echo "HAS_NEW_RELEASE=$(cat has-new-release/has-new-release)" >> $GITHUB_ENV
7272
7373 - uses : actions/checkout@v2
74- if : $ HAS_NEW_RELEASE == 1
74+ if : env. HAS_NEW_RELEASE == 1
7575
7676 - uses : actions/cache@v1
77- if : $ HAS_NEW_RELEASE == 1
77+ if : env. HAS_NEW_RELEASE == 1
7878 with :
7979 path : ~/.npm
8080 key : ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
8181 restore-keys : |
8282 ${{ runner.os }}-node-
8383
8484 - name : Set up Node
85- if : $ HAS_NEW_RELEASE == 1
85+ if : env. HAS_NEW_RELEASE == 1
8686 uses : actions/setup-node@v1
8787 with :
8888 node-version : ${{ matrix.node }}
8989
9090 - name : Prepare release
91- if : $ HAS_NEW_RELEASE == 1
91+ if : env. HAS_NEW_RELEASE == 1
9292 run : |
9393 npm ci
9494 npm run dist
@@ -97,38 +97,38 @@ jobs:
9797 tar -czvf pg-api-windows.tar.gz -C ./bin pg-api-win.exe
9898
9999 - name : Get upload url
100- if : $ HAS_NEW_RELEASE == 1
100+ if : env. HAS_NEW_RELEASE == 1
101101 run : echo "UPLOAD_URL=$(curl -s https://api.github.com/repos/supabase/pg-api/releases/latest | jq .upload_url -r)" >> $GITHUB_ENV
102102
103103 - name : Upload linux release asset
104- if : $ HAS_NEW_RELEASE == 1
104+ if : env. HAS_NEW_RELEASE == 1
105105 uses : actions/upload-release-asset@v1
106106 env :
107107 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
108108 with :
109- upload_url : $UPLOAD_URL
109+ upload_url : ${{ env. UPLOAD_URL }}
110110 asset_path : ./pg-api-linux.tar.gz
111111 asset_name : pg-api-linux.tar.gz
112112 asset_content_type : application/gzip
113113
114114 - name : Upload macos release asset
115- if : $ HAS_NEW_RELEASE == 1
115+ if : env. HAS_NEW_RELEASE == 1
116116 uses : actions/upload-release-asset@v1
117117 env :
118118 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
119119 with :
120- upload_url : $UPLOAD_URL
120+ upload_url : ${{ env. UPLOAD_URL }}
121121 asset_path : ./pg-api-macos.tar.gz
122122 asset_name : pg-api-macos.tar.gz
123123 asset_content_type : application/gzip
124124
125125 - name : Upload windows release asset
126- if : $ HAS_NEW_RELEASE == 1
126+ if : env. HAS_NEW_RELEASE == 1
127127 uses : actions/upload-release-asset@v1
128128 env :
129129 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
130130 with :
131- upload_url : $UPLOAD_URL
131+ upload_url : ${{ env. UPLOAD_URL }}
132132 asset_path : ./pg-api-windows.tar.gz
133133 asset_name : pg-api-windows.tar.gz
134134 asset_content_type : application/gzip
@@ -137,10 +137,10 @@ jobs:
137137 run : echo "VERSION=$(curl -s https://api.github.com/repos/supabase/pg-api/releases/latest | jq .name -r)" >> $GITHUB_ENV
138138
139139 - name : Upload image to Docker Hub
140- if : $ HAS_NEW_RELEASE == 1
140+ if : env. HAS_NEW_RELEASE == 1
141141 uses : docker/build-push-action@v1
142142 with :
143143 username : ${{ secrets.DOCKER_USERNAME }}
144144 password : ${{ secrets.DOCKER_PASSWORD }}
145145 repository : supabase/pg-api
146- tags : latest,$VERSION
146+ tags : latest,${{ env. VERSION }}
0 commit comments