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
|
name: Release
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
#- uses: actions/checkout@main
|
||||||
|
# with:
|
||||||
|
# repository: ${{ github.repository_owner }}/xenia-canary-releases
|
||||||
- uses: actions/download-artifact@main
|
- uses: actions/download-artifact@main
|
||||||
- name: Release
|
- name: Release
|
||||||
env:
|
env:
|
||||||
|
|
@ -22,41 +25,33 @@ jobs:
|
||||||
GH_REPO: ${{ github.repository_owner }}/xenia-canary-releases
|
GH_REPO: ${{ github.repository_owner }}/xenia-canary-releases
|
||||||
notes: ${{ github.event.head_commit.message }}
|
notes: ${{ github.event.head_commit.message }}
|
||||||
run: |
|
run: |
|
||||||
rm -rf **/*.pdb
|
|
||||||
case ${{ inputs.os }} in
|
case ${{ inputs.os }} in
|
||||||
windows)
|
windows)
|
||||||
assets=xenia_canary_windows.zip
|
asset=xenia_canary_${{ inputs.os }}.zip
|
||||||
7z a $assets './xenia_canary_windows/*'
|
7z a $asset -xr!'*.pdb' -mx9 -bb3
|
||||||
;;
|
;;
|
||||||
linux)
|
linux)
|
||||||
for dir in xenia_canary_${{ inputs.os }}*; do
|
asset=xenia_canary_${{ inputs.os }}.tar.xz
|
||||||
cd $dir
|
|
||||||
chmod +x xenia_canary
|
|
||||||
asset=${dir}.tar.gz
|
|
||||||
assets+=($asset)
|
|
||||||
tar -czvpf ../${asset} *
|
|
||||||
cd -
|
|
||||||
done
|
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
for asset in ${assets[@]}; do
|
if [ ! -f $asset ]; then
|
||||||
if [ ! -f $asset ]; then
|
ls -R
|
||||||
echo "::error::$asset doesn't exist!"
|
echo "::error::$asset doesn't exist!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
if [ $(stat -c%s $asset) -lt 100000 ]; then
|
if [ $(stat -c%s $asset) -lt 100000 ]; then
|
||||||
echo "::error::$asset is too small!"
|
ls -R
|
||||||
exit 1
|
echo "::error::$asset is too small!"
|
||||||
fi
|
exit 1
|
||||||
done
|
fi
|
||||||
create_or_edit_release() {
|
create_or_edit_release() {
|
||||||
local tag=$1
|
local tag=$1
|
||||||
local title=$2
|
local title=$2
|
||||||
if gh release view $tag; then
|
if gh release view $tag; then
|
||||||
gh release edit $tag -t $title -n "$notes"
|
gh release edit $tag -t $title -n "$notes"
|
||||||
gh release upload $tag ${assets[@]} --clobber
|
gh release upload $tag $asset --clobber
|
||||||
else
|
else
|
||||||
gh release create $tag ${assets[@]} --target 925ed98d5dce604b651027c36fb522dc1ff0fa55 -t $title -n "$notes"
|
gh release create $tag $asset --target 925ed98d5dce604b651027c36fb522dc1ff0fa55 -t $title -n "$notes"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
tag=${GITHUB_SHA::7}
|
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
|
- name: Prepare artifacts
|
||||||
id: prepare_artifacts
|
id: prepare_artifacts
|
||||||
run: |
|
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."
|
echo "::error::Binary is too small."
|
||||||
fi
|
fi
|
||||||
|
chmod +x $binary
|
||||||
mkdir -p artifacts
|
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
|
- name: Upload xenia canary artifacts
|
||||||
if: steps.prepare_artifacts.outcome == 'success'
|
if: steps.prepare_artifacts.outcome == 'success'
|
||||||
uses: actions/upload-artifact@main
|
uses: actions/upload-artifact@main
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue