-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI: add github workflow to create source-only release tarball
closes #16645
- Loading branch information
1 parent
c4685e8
commit d3c14a6
Showing
1 changed file
with
49 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: CI Generate Source Only Tarball | ||
|
||
# Trigger whenever a release and/or is created | ||
on: | ||
release: | ||
types: | ||
- created | ||
push: | ||
tags: | ||
- "v*.*" | ||
|
||
jobs: | ||
build: | ||
name: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
|
||
- name: archive | ||
id: archive | ||
run: | | ||
VERSION=${GITHUB_REF##*/} | ||
test -z "$VERSION" && VERSION=${{ github.event.release.tag_name }} | ||
VERSION=$(printf "%s\n" "$VERSION" | sed 's/^v//') | ||
PKGNAME="retroarch-sourceonly-$VERSION" | ||
mkdir -p /tmp/$PKGNAME | ||
mv * /tmp/$PKGNAME | ||
mv /tmp/$PKGNAME . | ||
rm -rf $PKGNAME/pkg || true | ||
rm -rf $PKGNAME/wii/libogc || true | ||
rm -rf $PKGNAME/deps/glslang/glslang/Test || true | ||
rm -rf $PKGNAME/deps/SPIRV-Cross/reference || true | ||
rm -rf $PKGNAME/gfx/include/userland || true | ||
find $PKGNAME/ -type f -name '*.a' -delete || true | ||
find $PKGNAME/ -type f -name '*.lib' -delete || true | ||
find $PKGNAME/ -type f -name '*.dylib' -delete || true | ||
find $PKGNAME/ -type f -name '*.so.*' -delete || true | ||
find $PKGNAME/ -type f -name '*.dll' -delete || true | ||
TARBALL=$PKGNAME.tar.xz | ||
tar cJf $TARBALL $PKGNAME | ||
echo "tarball=$TARBALL" >> $GITHUB_OUTPUT | ||
- name: upload tarball | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
files: ${{ steps.archive.outputs.tarball }} |