Update CI workflow for main branch and release events
This commit is contained in:
parent
ad0c7f3e06
commit
311132e765
1 changed files with 7 additions and 15 deletions
22
.github/workflows/ci.yml
vendored
22
.github/workflows/ci.yml
vendored
|
@ -77,18 +77,10 @@ jobs:
|
||||||
name: ncc-build
|
name: ncc-build
|
||||||
path: ncc-build
|
path: ncc-build
|
||||||
|
|
||||||
- name: Upload release artifact to GitHub
|
- name: Upload to GitHub Release
|
||||||
run: |
|
uses: softprops/action-gh-release@v1
|
||||||
BUILD_FILE="ncc-build/net.nosial.configlib.ncc"
|
with:
|
||||||
if [ -f "$BUILD_FILE" ]; then
|
files: |
|
||||||
echo "Uploading build artifact to GitHub release"
|
ncc-build/net.nosial.configlib.ncc
|
||||||
curl \
|
env:
|
||||||
-X POST \
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
|
|
||||||
-H "Content-Type: application/octet-stream" \
|
|
||||||
--data-binary @"$BUILD_FILE" \
|
|
||||||
"$GITHUB_API_URL/repos/${{ github.repository }}/releases/${{ github.event.release.id }}/assets?name=$(basename $BUILD_FILE)"
|
|
||||||
else
|
|
||||||
echo "Build artifact not found"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
Loading…
Add table
Reference in a new issue