test add assets
Some checks failed
Some checks failed
Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
This commit is contained in:
parent
6b052b53b5
commit
0d70291afe
1 changed files with 27 additions and 25 deletions
|
|
@ -31,29 +31,6 @@ jobs:
|
||||||
|
|
||||||
- name: Afficher la variable
|
- name: Afficher la variable
|
||||||
run: echo "Release cible = ${{ steps.setvar.outputs.release_cible }}"
|
run: echo "Release cible = ${{ steps.setvar.outputs.release_cible }}"
|
||||||
prerelease:
|
|
||||||
runs-on: docker
|
|
||||||
needs: set-release-target
|
|
||||||
steps:
|
|
||||||
- name: Create prerelease
|
|
||||||
env:
|
|
||||||
TOKEN: ${{ secrets.RELEASE }}
|
|
||||||
TAG: ${{ needs.set-release-target.outputs.release_cible }}
|
|
||||||
run: |
|
|
||||||
curl -vvv -X POST \
|
|
||||||
-H "Authorization: token $TOKEN" \
|
|
||||||
-H "Content-Type: application/json" \
|
|
||||||
--trace - \
|
|
||||||
"https://git.g3e.fr/api/v1/repos/${{ github.repository }}/releases" \
|
|
||||||
-d @- <<EOF
|
|
||||||
{
|
|
||||||
"tag_name": "$TAG",
|
|
||||||
"name": "$TAG",
|
|
||||||
"body": "Prerelease automatique générée par la CI",
|
|
||||||
"draft": false,
|
|
||||||
"prerelease": true
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
build:
|
build:
|
||||||
runs-on: docker
|
runs-on: docker
|
||||||
needs: set-release-target
|
needs: set-release-target
|
||||||
|
|
@ -86,9 +63,12 @@ jobs:
|
||||||
with:
|
with:
|
||||||
name: ${{ matrix.binaries }}-${{ env.RELEASE_CIBLE }}-${{ matrix.goos }}-${{ matrix.goarch }}
|
name: ${{ matrix.binaries }}-${{ env.RELEASE_CIBLE }}-${{ matrix.goos }}-${{ matrix.goarch }}
|
||||||
path: dist/${{ matrix.binaries }}_${{ matrix.goos }}_${{ matrix.goarch }}
|
path: dist/${{ matrix.binaries }}_${{ matrix.goos }}_${{ matrix.goarch }}
|
||||||
publish:
|
prerelease:
|
||||||
runs-on: docker
|
runs-on: docker
|
||||||
needs: build
|
needs: build
|
||||||
|
env:
|
||||||
|
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
|
||||||
|
|
@ -96,3 +76,25 @@ jobs:
|
||||||
path: dist/
|
path: dist/
|
||||||
- name: Publier tous les binaires
|
- name: Publier tous les binaires
|
||||||
run: ls -l dist/
|
run: ls -l dist/
|
||||||
|
- name: Create prerelease
|
||||||
|
run: |
|
||||||
|
curl -vvv -X POST \
|
||||||
|
-H "Authorization: token $TOKEN" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
"https://git.g3e.fr/api/v1/repos/${{ github.repository }}/releases" \
|
||||||
|
-d @- <<EOF
|
||||||
|
{
|
||||||
|
"tag_name": "$TAG",
|
||||||
|
"name": "$TAG",
|
||||||
|
"body": "Prerelease automatique générée par la CI",
|
||||||
|
"draft": false,
|
||||||
|
"prerelease": true
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
- name: Upload asset
|
||||||
|
run: |
|
||||||
|
RELEASE_ID=$(curl -s \
|
||||||
|
-H "Authorization: token $TOKEN" \
|
||||||
|
https://git.g3e.fr/api/v1/repos/${{ github.repository }}/releases/tags/$TAG \
|
||||||
|
| jq -r .id)
|
||||||
|
echo ${RELEASE_ID}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue