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 }}
|
path: dist/${{ matrix.binaries }}_${{ matrix.goos }}_${{ matrix.goarch }}
|
||||||
prerelease:
|
prerelease:
|
||||||
runs-on: docker
|
runs-on: docker
|
||||||
needs: build
|
needs: [set-release-target, build]
|
||||||
env:
|
env:
|
||||||
TOKEN: ${{ secrets.RELEASE }}
|
TOKEN: ${{ secrets.RELEASE }}
|
||||||
|
TAG: ${{ needs.set-release-target.outputs.release_cible }}
|
||||||
steps:
|
steps:
|
||||||
- name: Download all build artifacts
|
- name: Download all build artifacts
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v3
|
||||||
|
|
@ -81,7 +82,7 @@ jobs:
|
||||||
apt-get install -y jq
|
apt-get install -y jq
|
||||||
- name: Create prerelease
|
- name: Create prerelease
|
||||||
run: |
|
run: |
|
||||||
curl -vvv -X POST \
|
curl -X POST \
|
||||||
-H "Authorization: token $TOKEN" \
|
-H "Authorization: token $TOKEN" \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
"https://git.g3e.fr/api/v1/repos/${{ github.repository }}/releases" \
|
"https://git.g3e.fr/api/v1/repos/${{ github.repository }}/releases" \
|
||||||
|
|
@ -94,6 +95,16 @@ jobs:
|
||||||
"prerelease": true
|
"prerelease": true
|
||||||
}
|
}
|
||||||
EOF
|
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
|
- name: Upload asset
|
||||||
run: |
|
run: |
|
||||||
RELEASE_ID=$(curl -s \
|
RELEASE_ID=$(curl -s \
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue