mirror of
https://github.com/xenia-project/xenia.git
synced 2025-12-06 07:12:03 +01:00
[CI] Fix releases (again)
This commit is contained in:
parent
a871079ee0
commit
04adfffa35
41
.github/workflows/Create_release.yml
vendored
41
.github/workflows/Create_release.yml
vendored
|
|
@ -15,6 +15,9 @@ jobs:
|
|||
name: Release
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
#- uses: actions/checkout@main
|
||||
# with:
|
||||
# repository: ${{ github.repository_owner }}/xenia-canary-releases
|
||||
- uses: actions/download-artifact@main
|
||||
- name: Release
|
||||
env:
|
||||
|
|
@ -22,41 +25,33 @@ jobs:
|
|||
GH_REPO: ${{ github.repository_owner }}/xenia-canary-releases
|
||||
notes: ${{ github.event.head_commit.message }}
|
||||
run: |
|
||||
rm -rf **/*.pdb
|
||||
case ${{ inputs.os }} in
|
||||
windows)
|
||||
assets=xenia_canary_windows.zip
|
||||
7z a $assets './xenia_canary_windows/*'
|
||||
asset=xenia_canary_${{ inputs.os }}.zip
|
||||
7z a $asset -xr!'*.pdb' -mx9 -bb3
|
||||
;;
|
||||
linux)
|
||||
for dir in xenia_canary_${{ inputs.os }}*; do
|
||||
cd $dir
|
||||
chmod +x xenia_canary
|
||||
asset=${dir}.tar.gz
|
||||
assets+=($asset)
|
||||
tar -czvpf ../${asset} *
|
||||
cd -
|
||||
done
|
||||
asset=xenia_canary_${{ inputs.os }}.tar.xz
|
||||
;;
|
||||
esac
|
||||
for asset in ${assets[@]}; do
|
||||
if [ ! -f $asset ]; then
|
||||
echo "::error::$asset doesn't exist!"
|
||||
exit 1
|
||||
fi
|
||||
if [ $(stat -c%s $asset) -lt 100000 ]; then
|
||||
echo "::error::$asset is too small!"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
if [ ! -f $asset ]; then
|
||||
ls -R
|
||||
echo "::error::$asset doesn't exist!"
|
||||
exit 1
|
||||
fi
|
||||
if [ $(stat -c%s $asset) -lt 100000 ]; then
|
||||
ls -R
|
||||
echo "::error::$asset is too small!"
|
||||
exit 1
|
||||
fi
|
||||
create_or_edit_release() {
|
||||
local tag=$1
|
||||
local title=$2
|
||||
if gh release view $tag; then
|
||||
gh release edit $tag -t $title -n "$notes"
|
||||
gh release upload $tag ${assets[@]} --clobber
|
||||
gh release upload $tag $asset --clobber
|
||||
else
|
||||
gh release create $tag ${assets[@]} --target 925ed98d5dce604b651027c36fb522dc1ff0fa55 -t $title -n "$notes"
|
||||
gh release create $tag $asset --target 925ed98d5dce604b651027c36fb522dc1ff0fa55 -t $title -n "$notes"
|
||||
fi
|
||||
}
|
||||
tag=${GITHUB_SHA::7}
|
||||
|
|
|
|||
6
.github/workflows/Linux_build.yml
vendored
6
.github/workflows/Linux_build.yml
vendored
|
|
@ -94,11 +94,13 @@ jobs:
|
|||
- name: Prepare artifacts
|
||||
id: prepare_artifacts
|
||||
run: |
|
||||
if [ $(stat -c %s build/bin/Linux/Release/xenia_canary) -le 100000 ]; then
|
||||
binary=build/bin/Linux/Release/xenia_canary
|
||||
if [ $(stat -c%s $binary) -le 100000 ]; then
|
||||
echo "::error::Binary is too small."
|
||||
fi
|
||||
chmod +x $binary
|
||||
mkdir -p artifacts
|
||||
cp -r build/bin/Linux/Release/xenia_canary LICENSE artifacts
|
||||
XZ_OPT=-e9 tar cJvpf artifacts/xenia_canary_linux.tar.xz $binary LICENSE
|
||||
- name: Upload xenia canary artifacts
|
||||
if: steps.prepare_artifacts.outcome == 'success'
|
||||
uses: actions/upload-artifact@main
|
||||
|
|
|
|||
Loading…
Reference in a new issue