diff --git a/.gitea/publish.sh b/.gitea/publish.sh new file mode 100755 index 0000000..3203cfb --- /dev/null +++ b/.gitea/publish.sh @@ -0,0 +1,13 @@ +#! /bin/sh + +PACKAGE=${GITHUB_REPOSITORY#*/} +VERSION=$(date +%Y-%m-%dt%H.%M.%S) + +for path in "$@"; do + fn=$(basename "$path") + curl \ + --user "$GITHUB_ACTOR:$GITHUB_TOKEN" \ + --upload-file "$path" \ + $GITHUB_API_URL/$GITHUB_ACTOR/generic/$PACKAGE/$VERSION/$fn + # $GITHUB_SERVER_URL/api/packages/$GITHUB_ACTOR/generic/$PACKAGE/$VERSION/$fn +done diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index fc00945..2b9cb90 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -7,3 +7,4 @@ jobs: steps: - run: git clone $GITHUB_SERVER_URL/$GITHUB_REPOSITORY . - run: .gitea/build.sh + - run: .gitea/publish.sh out/*