4
4
push :
5
5
branches :
6
6
- master
7
+ workflow_dispatch :
7
8
8
9
jobs :
9
10
release :
23
24
node-version : ${{ matrix.node }}
24
25
25
26
- name : Get version before
26
- run : echo ::set-env name= VERSION_BEFORE:: $(curl -s https://api.github.com/repos/supabase/pg-api/releases/latest | jq .name -r)
27
+ run : echo " VERSION_BEFORE= $(curl -s https://api.github.com/repos/supabase/pg-api/releases/latest | jq .name -r)" >> $GITHUB_ENV
27
28
28
29
- name : Release on GitHub
29
30
run : npx semantic-release -p \
34
35
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
35
36
36
37
- name : Get version after
37
- run : echo ::set-env name= VERSION_AFTER:: $(curl -s https://api.github.com/repos/supabase/pg-api/releases/latest | jq .name -r)
38
+ run : echo " VERSION_AFTER= $(curl -s https://api.github.com/repos/supabase/pg-api/releases/latest | jq .name -r)" >> $GITHUB_ENV
38
39
39
40
- name : Check version difference
40
41
run : |
67
68
name : has-new-release
68
69
69
70
- name : Check for new release
70
- run : echo ::set-env name= HAS_NEW_RELEASE:: $(cat has-new-release/has-new-release)
71
+ run : echo " HAS_NEW_RELEASE= $(cat has-new-release/has-new-release)" >> $GITHUB_ENV
71
72
72
73
- uses : actions/checkout@v2
73
74
if : env.HAS_NEW_RELEASE == 1
@@ -91,13 +92,13 @@ jobs:
91
92
run : |
92
93
npm ci
93
94
npm run dist
94
- tar -czvf pg-api-linux.tar.gz -C ./bin start -linux
95
- tar -czvf pg-api-macos.tar.gz -C ./bin start -macos
96
- tar -czvf pg-api-windows.tar.gz -C ./bin start -win.exe
95
+ tar -czvf pg-api-linux.tar.gz -C ./bin pg-api -linux
96
+ tar -czvf pg-api-macos.tar.gz -C ./bin pg-api -macos
97
+ tar -czvf pg-api-windows.tar.gz -C ./bin pg-api -win.exe
97
98
98
99
- name : Get upload url
99
100
if : env.HAS_NEW_RELEASE == 1
100
- run : echo ::set-env name= UPLOAD_URL:: $(curl -s https://api.github.com/repos/supabase/pg-api/releases/latest | jq .upload_url -r)
101
+ run : echo " UPLOAD_URL= $(curl -s https://api.github.com/repos/supabase/pg-api/releases/latest | jq .upload_url -r)" >> $GITHUB_ENV
101
102
102
103
- name : Upload linux release asset
103
104
if : env.HAS_NEW_RELEASE == 1
@@ -133,7 +134,7 @@ jobs:
133
134
asset_content_type : application/gzip
134
135
135
136
- name : Get version
136
- run : echo ::set-env name= VERSION:: $(curl -s https://api.github.com/repos/supabase/pg-api/releases/latest | jq .name -r)
137
+ run : echo " VERSION= $(curl -s https://api.github.com/repos/supabase/pg-api/releases/latest | jq .name -r)" >> $GITHUB_ENV
137
138
138
139
- name : Upload image to Docker Hub
139
140
if : env.HAS_NEW_RELEASE == 1
0 commit comments