File tree Expand file tree Collapse file tree 3 files changed +22
-1
lines changed Expand file tree Collapse file tree 3 files changed +22
-1
lines changed Original file line number Diff line number Diff line change 2121 export GOPATH=/go && \
2222 export PATH=${GOPATH}/bin:${GO_HOME}/bin/:$PATH && \
2323 echo "/usr/bin/go/bin" >> $GITHUB_PATH
24+ echo "/usr/bin/x86_64-w64-mingw32-gcc" >> GITHUB_PATH
2425 go version && \
2526 wget --no-check-certificate --progress=dot:mega https://github.com/wangyoucao577/assets-uploader/releases/download/v0.3.0/github-assets-uploader-v0.3.0-linux-amd64.tar.gz -O github-assets-uploader.tar.gz && \
2627 tar -zxf github-assets-uploader.tar.gz && \
4647 - name : Upload assets
4748 run : |
4849 github-assets-uploader -f authorizer-${VERSION}-windows-amd64.zip -mediatype application/zip -repo authorizerdev/authorizer -token ${{secrets.RELEASE_TOKEN}} -tag ${VERSION} && \
49- github-assets-uploader -f authorizer-${VERSION}-linux-amd64.tar.gz -mediatype application/gzip -repo authorizerdev/authorizer -token ${{secrets.RELEASE_TOKEN}} -tag ${VERSION} && \
50+ github-assets-uploader -f authorizer-${VERSION}-linux-amd64.tar.gz -mediatype application/gzip -repo authorizerdev/authorizer -token ${{secrets.RELEASE_TOKEN}} -tag ${VERSION}
5051
5152 # - uses: wangyoucao577/[email protected] 5253 # with:
Original file line number Diff line number Diff line change 66.env
77data.db
88.DS_Store
9+ .env.local
10+ * .tar.gz
Original file line number Diff line number Diff line change 1+ VERSION=" $1 "
2+ # make clean && CGO_ENABLED=1 make
3+ FILE_NAME=authorizer-${VERSION} -darwin-amd64.tar.gz
4+ # tar cvfz ${FILE_NAME} .env app build templates
5+ AUTH=" Authorization: token $GITHUB_TOKEN "
6+ RELASE_INFO=$( curl -sH " $AUTH " https://api.github.com/repos/authorizerdev/authorizer/releases/tags/${VERSION} )
7+ echo $RELASE_INFO
8+
9+ eval $( echo " $RELASE_INFO " | grep -m 1 " id.:" | grep -w id | tr : = | tr -cd ' [[:alnum:]]=' )
10+ [ " $id " ] || { echo " Error: Failed to get release id for tag: $VERSION " ; echo " $RELASE_INFO " | awk ' length($0)<100' >&2 ; exit 1; }
11+ echo $id
12+ GH_ASSET=" https://uploads.github.com/repos/authorizerdev/authorizer/releases/$id /assets?name=$( basename $FILE_NAME ) "
13+
14+ echo $GH_ASSET
15+
16+ curl -H $AUTH -H " Content-Type: $( file -b --mime-type $FILE_NAME ) " --data-binary @$FILE_NAME $GH_ASSET
17+
18+ curl " $GITHUB_OAUTH_BASIC " --data-binary @" $FILE_NAME " -H " Authorization: token $GITHUB_TOKEN " -H " Content-Type: application/octet-stream" $GH_ASSET
You can’t perform that action at this time.
0 commit comments