Skip to content

Commit

Permalink
Merge pull request #15390 from rofl0r/ci_source_release
Browse files Browse the repository at this point in the history
CI: add github action to build source release tarball with submodules
  • Loading branch information
unknownbrackets authored Feb 16, 2022
2 parents 1f71a69 + cf1c77b commit 7a7bb7d
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/tarball.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Generate Source Tarball

# Trigger whenever a release is created
on:
release:
types:
- created

jobs:
build:
name: build
runs-on: ubuntu-latest
steps:

- uses: actions/checkout@v2
with:
submodules: recursive

- name: archive
id: archive
run: |
VERSION=$(printf "%s\n" ${{ github.event.release.tag_name }} | sed 's/^v//')
PKGNAME="ppsspp-$VERSION"
mkdir -p /tmp/$PKGNAME
mv * /tmp/$PKGNAME
mv /tmp/$PKGNAME .
find $PKGNAME/ffmpeg -name '*.a' -delete || true
find $PKGNAME/ffmpeg -name '*.lib' -delete || true
find $PKGNAME/ext -name '*.dylib' -delete || true
find $PKGNAME/ext -name '*.lib' -delete || true
find $PKGNAME/ext -name '*.so.*' -delete || true
find $PKGNAME/dx9sdk -name '*.lib' -delete || true
find $PKGNAME/dx9sdk -name '*.dll' -delete || true
rm -rf $PKGNAME/ext/rapidjson/thirdparty/gtest || true
sed -i "s;unknown;${VERSION};" $PKGNAME/git-version.cmake || true
TARBALL=$PKGNAME.tar.xz
tar cJf $TARBALL $PKGNAME
echo "::set-output name=tarball::$TARBALL"
- name: upload tarball
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./${{ steps.archive.outputs.tarball }}
asset_name: ${{ steps.archive.outputs.tarball }}
asset_content_type: application/x-xz

0 comments on commit 7a7bb7d

Please sign in to comment.