add file upload first
Some checks failed
Some checks failed
Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
This commit is contained in:
parent
58f7b3f1fe
commit
b816ffae81
1 changed files with 13 additions and 2 deletions
|
|
@ -65,9 +65,10 @@ jobs:
|
|||
path: dist/${{ matrix.binaries }}_${{ matrix.goos }}_${{ matrix.goarch }}
|
||||
prerelease:
|
||||
runs-on: docker
|
||||
needs: build
|
||||
needs: [set-release-target, build]
|
||||
env:
|
||||
TOKEN: ${{ secrets.RELEASE }}
|
||||
TAG: ${{ needs.set-release-target.outputs.release_cible }}
|
||||
steps:
|
||||
- name: Download all build artifacts
|
||||
uses: actions/download-artifact@v3
|
||||
|
|
@ -81,7 +82,7 @@ jobs:
|
|||
apt-get install -y jq
|
||||
- name: Create prerelease
|
||||
run: |
|
||||
curl -vvv -X POST \
|
||||
curl -X POST \
|
||||
-H "Authorization: token $TOKEN" \
|
||||
-H "Content-Type: application/json" \
|
||||
"https://git.g3e.fr/api/v1/repos/${{ github.repository }}/releases" \
|
||||
|
|
@ -94,6 +95,16 @@ jobs:
|
|||
"prerelease": true
|
||||
}
|
||||
EOF
|
||||
ls dist | while read tmp
|
||||
do
|
||||
FILE=$(ls "./dist/${tmp}")
|
||||
echo ${FILE}
|
||||
curl -X POST \
|
||||
-H "Authorization: token $TOKEN" \
|
||||
-H "Content-Type: application/octet-stream" \
|
||||
--data-binary @dist/${tmp}/${FILE} \
|
||||
"https://forgejo.example/api/v1/repos/{{ github.repository }}/releases/$RELEASE_ID/assets?name=${FILE}"
|
||||
done
|
||||
- name: Upload asset
|
||||
run: |
|
||||
RELEASE_ID=$(curl -s \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue