Skip to content

Commit

Permalink
ci: developing release build
Browse files Browse the repository at this point in the history
  • Loading branch information
Robin Bryce committed Dec 6, 2023
1 parent 55e20f3 commit df57662
Showing 1 changed file with 19 additions and 9 deletions.
28 changes: 19 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: ci
on: [release]
on:
push:
release:
types: [published]

jobs:
build:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -54,17 +58,23 @@ jobs:
path: exported/proto-include
- name: show files
working-directory: exported/proto-include
run: ls -R
run: find . -type d
- name: Upload proto files
working-directory: exported
run: |
TAG="$(echo "${GITHUB_REF}" | grep tags | grep -o "[^/]*$" || true)"
if [ -z "$TAG" ]; then
echo "::error ::This is not a tagged push"
echo "::error ::This is not a tagged release"
exit 1
fi
AUTH_HEADER="Authorization: token ${GITHUB_TOKEN}"
RELEASE_ID=$TAG
mv proto-include go-datatrails-common-api-proto
tar -czf go-datatrails-common-api-proto.tar.gz go-datatrails-common-api-proto
gh release upload $TAG go-datatrails-common-api-proto.tar.gz
# AUTH_HEADER="Authorization: token ${GITHUB_TOKEN}"
# RELEASE_ID=$TAG
# echo "Verifying release"
# HTTP_RESPONSE=$(curl --write-out "HTTPSTATUS:%{http_code}" \
Expand All @@ -78,9 +88,9 @@ jobs:
# echo "::error ::Release is missing"
# exit 1
# fi
path=proto-include
# path=proto-include
if [[ ! -d $path ]]; then exit 1; fi
# if [[ ! -d $path ]]; then exit 1; fi
ghr -u "${GITHUB_REPOSITORY%/*}" -r "${GITHUB_REPOSITORY#*/}" "${GITHUB_REF#refs/tags/}" "${path}"
echo "::debug ::Uploaded $path"
# ghr -u "${GITHUB_REPOSITORY%/*}" -r "${GITHUB_REPOSITORY#*/}" "${GITHUB_REF#refs/tags/}" "${path}"
# echo "::debug ::Uploaded $path"

0 comments on commit df57662

Please sign in to comment.