@@ -35,16 +35,15 @@ jobs:
35
35
# -I dir compatible location
36
36
path : exported/proto-include
37
37
38
- # disabled until protos work
39
- # - uses: actions/upload-artifact@v3
40
- # with:
41
- # name: go-datatrails-common-api-swagger
42
- # path: exported/swagger
38
+ - uses : actions/upload-artifact@v3
39
+ with :
40
+ name : go-datatrails-common-api-swagger
41
+ path : exported/swagger
43
42
44
- # - uses: actions/upload-artifact@v3
45
- # with:
46
- # name: go-datatrails-common-api-gen
47
- # path: exported/datatrails-common-api-gen
43
+ - uses : actions/upload-artifact@v3
44
+ with :
45
+ name : go-datatrails-common-api-gen
46
+ path : exported/datatrails-common-api-gen
48
47
49
48
50
49
release :
@@ -57,43 +56,40 @@ jobs:
57
56
with :
58
57
name : go-datatrails-common-api-proto
59
58
path : exported/proto-include
60
- - name : show files
61
- working-directory : exported/proto-include
59
+
60
+ - uses : actions/download-artifact@v3
61
+ with :
62
+ name : go-datatrails-common-api-swagger
63
+ path : exported/swagger
64
+
65
+ - uses : actions/download-artifact@v3
66
+ with :
67
+ name : datatrails-common-api-gen
68
+ path : exported/datatrails-common-api-gen
69
+
70
+ - name : show directories
71
+ working-directory : exported/
62
72
run : find . -type d
63
73
- name : Upload proto files
64
74
env :
65
75
GH_TOKEN : ${{ github.token }}
66
76
working-directory : exported
67
77
run : |
68
78
TAG="$(echo "${GITHUB_REF}" | grep tags | grep -o "[^/]*$" || true)"
79
+
80
+ # this test will fail if the event type is not 'published'
69
81
if [ -z "$TAG" ]; then
70
82
echo "::error ::This is not a tagged release"
71
83
exit 1
72
84
fi
73
85
74
- mv proto-include go-datatrails-common-api-proto
75
- tar -czf go-datatrails-common-api-proto.tar.gz go-datatrails-common-api-proto
76
-
86
+ mv proto-include go-datatrails-common-api-proto-include
87
+ tar -czf go-datatrails-common-api-proto-include.tar.gz go-datatrails-common-api-proto-include
77
88
gh release upload $TAG go-datatrails-common-api-proto.tar.gz
78
89
79
- # AUTH_HEADER="Authorization: token ${GITHUB_TOKEN}"
80
- # RELEASE_ID=$TAG
81
-
82
- # echo "Verifying release"
83
- # HTTP_RESPONSE=$(curl --write-out "HTTPSTATUS:%{http_code}" \
84
- # -sSL \
85
- # -H "${AUTH_HEADER}" \
86
- # "https://api.github.com/repos/${GITHUB_REPOSITORY}/releases/tags/${RELEASE_ID}")
87
-
88
- # HTTP_STATUS=$(echo "$HTTP_RESPONSE" | tr -d '\n' | sed -e 's/.*HTTPSTATUS://')
89
-
90
- # if [[ "$HTTP_STATUS" -ne 200 ]]; then
91
- # echo "::error ::Release is missing"
92
- # exit 1
93
- # fi
94
- # path=proto-include
95
-
96
- # if [[ ! -d $path ]]; then exit 1; fi
90
+ mv swagger go-datatrails-common-api-swagger
91
+ tar -czf go-datatrails-common-api-swagger.tar.gz go-datatrails-common-api-swagger
92
+ gh release upload $TAG go-datatrails-common-api-swagger.tar.gz
97
93
98
- # ghr -u "${GITHUB_REPOSITORY%/*}" -r "${GITHUB_REPOSITORY#*/}" "${GITHUB_REF#refs/tags/}" "${path}"
99
- # echo "::debug ::Uploaded $path"
94
+ tar -czf go-datatrails-common-api-gen.tar.gz go-datatrails-common-api-gen
95
+ gh release upload $TAG go-datatrails-common-api-gen.tar.gz
0 commit comments