Fix Gitea Actions: remove upload/download-artifact@v4 (GHES incompatible), use action-gh-release per job
This commit is contained in:
51
.github/workflows/ci.yml
vendored
51
.github/workflows/ci.yml
vendored
@ -103,17 +103,11 @@ jobs:
|
|||||||
run: dpkg-buildpackage -us -uc -b
|
run: dpkg-buildpackage -us -uc -b
|
||||||
- name: Copy .deb to workspace
|
- name: Copy .deb to workspace
|
||||||
run: cp ../linux-patch-api_*.deb .
|
run: cp ../linux-patch-api_*.deb .
|
||||||
- name: Upload .deb artifact
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: linux-patch-api-deb
|
|
||||||
path: linux-patch-api_*.deb
|
|
||||||
retention-days: 30
|
|
||||||
- name: Upload to releases (on tag)
|
- name: Upload to releases (on tag)
|
||||||
if: startsWith(github.ref, 'refs/tags/')
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
with:
|
with:
|
||||||
files: ../linux-patch-api_*.deb
|
files: linux-patch-api_*.deb
|
||||||
|
|
||||||
# RHEL/CentOS/Fedora Package Build
|
# RHEL/CentOS/Fedora Package Build
|
||||||
build-rpm:
|
build-rpm:
|
||||||
@ -132,12 +126,6 @@ jobs:
|
|||||||
- name: Build RPM package
|
- name: Build RPM package
|
||||||
run: |
|
run: |
|
||||||
rpmbuild -ba linux-patch-api.spec
|
rpmbuild -ba linux-patch-api.spec
|
||||||
- name: Upload .rpm artifact
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: linux-patch-api-rpm
|
|
||||||
path: ~/rpmbuild/RPMS/x86_64/*.rpm
|
|
||||||
retention-days: 30
|
|
||||||
- name: Upload to releases (on tag)
|
- name: Upload to releases (on tag)
|
||||||
if: startsWith(github.ref, 'refs/tags/')
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
@ -184,12 +172,11 @@ jobs:
|
|||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
abuild -F -r
|
abuild -F -r
|
||||||
- name: Upload .apk artifact
|
- name: Upload to releases (on tag)
|
||||||
uses: actions/upload-artifact@v4
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
|
uses: softprops/action-gh-release@v1
|
||||||
with:
|
with:
|
||||||
name: linux-patch-api-apk
|
files: ~/packages/x86_64/*.apk
|
||||||
path: ~/packages/x86_64/*.apk
|
|
||||||
retention-days: 30
|
|
||||||
|
|
||||||
# Arch Linux Package Build
|
# Arch Linux Package Build
|
||||||
build-arch:
|
build-arch:
|
||||||
@ -231,31 +218,9 @@ jobs:
|
|||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
makepkg -f --noconfirm
|
makepkg -f --noconfirm
|
||||||
- name: Upload .pkg.tar.zst artifact
|
- name: Upload to releases (on tag)
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: linux-patch-api-arch
|
|
||||||
path: '*.pkg.tar.zst'
|
|
||||||
retention-days: 30
|
|
||||||
|
|
||||||
# Release - Collect all packages
|
|
||||||
release:
|
|
||||||
name: Create Release
|
|
||||||
needs: [build-deb, build-rpm, build-apk, build-arch]
|
|
||||||
runs-on: linux
|
|
||||||
container: node:18
|
|
||||||
if: startsWith(github.ref, 'refs/tags/')
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- name: Download all packages
|
|
||||||
uses: actions/download-artifact@v4
|
|
||||||
with:
|
|
||||||
pattern: linux-patch-api-*
|
|
||||||
merge-multiple: true
|
|
||||||
path: ./releases/
|
|
||||||
- name: List release artifacts
|
|
||||||
run: ls -la ./releases/
|
|
||||||
- name: Upload to Gitea releases
|
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
with:
|
with:
|
||||||
files: releases/*
|
files: '*.pkg.tar.zst'
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user