mirror of
https://github.com/anyproto/anytype-kotlin.git
synced 2025-06-08 05:47:05 +09:00
Fix/ci secrets (#148)
This commit is contained in:
parent
06556571e7
commit
2e7e29351c
3 changed files with 7 additions and 10 deletions
2
.github/workflows/workflow.yml
vendored
2
.github/workflows/workflow.yml
vendored
|
@ -7,7 +7,7 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
- run: ./middleware.sh
|
||||
- run: ./middleware.sh ${{ secrets.ANYTYPE_SECRET }}
|
||||
- run: ./gradlew build test -Dpre-dex=false
|
||||
- uses: actions/upload-artifact@master
|
||||
with:
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
* `ControlPanelToolbar` holds now the id of the focused block (#133)
|
||||
* The main toolbar is hidden when no block is focused on a page (#103)
|
||||
* Regress: new paragraph is not focused when created after on-enter-press event is triggered (#138)
|
||||
* Fixed Github Actions CI issue related with token.
|
||||
|
||||
### Middleware
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
TOKEN=$1
|
||||
|
||||
PROPERTY_PATH="middleware.path"
|
||||
PROPERTY_VERSION="middleware.version"
|
||||
LIBRARY_PATH="libs/lib.aar"
|
||||
|
@ -8,18 +10,12 @@ REPO="anytypeio/go-anytype-middleware"
|
|||
FILE="lib.tar.gz"
|
||||
GITHUB="api.github.com"
|
||||
|
||||
#echo -n "GitHub auth token: "
|
||||
#read -s token
|
||||
#printf "\n"
|
||||
|
||||
token='185fa730ee27be84392c8e334d1afb808761cdc6'
|
||||
|
||||
if [ "$token" = "" ]; then
|
||||
if [ "$TOKEN" = "" ]; then
|
||||
echo "ERROR: token is empty"
|
||||
exit 1
|
||||
fi;
|
||||
|
||||
version=`curl -H "Authorization: token $token" -H "Accept: application/vnd.github.v3+json" -sL https://$GITHUB/repos/$REPO/releases | jq ".[0]"`
|
||||
version=`curl -H "Authorization: token $TOKEN" -H "Accept: application/vnd.github.v3+json" -sL https://$GITHUB/repos/$REPO/releases | jq ".[0]"`
|
||||
tag=`echo $version | jq ".tag_name"`
|
||||
asset_id=`echo $version | jq ".assets | map(select(.name | match(\"android_lib_\";\"i\")))[0].id"`
|
||||
|
||||
|
@ -31,7 +27,7 @@ fi;
|
|||
printf "Version: $tag\n"
|
||||
printf "Found asset: $asset_id\n"
|
||||
echo -n "Downloading file... "
|
||||
curl -sL -H 'Accept: application/octet-stream' https://$token:@$GITHUB/repos/$REPO/releases/assets/$asset_id > $FILE
|
||||
curl -sL -H 'Accept: application/octet-stream' https://$TOKEN:@$GITHUB/repos/$REPO/releases/assets/$asset_id > $FILE
|
||||
printf "Done\n"
|
||||
|
||||
echo -n "Uncompressing... "
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue