Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: add github action to build source release tarball with submodules #15390

Merged
merged 11 commits into from
Feb 16, 2022
39 changes: 39 additions & 0 deletions .github/workflows/build_source_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Build Source Release
rofl0r marked this conversation as resolved.
Show resolved Hide resolved

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

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

- uses: actions/checkout@v1
with:
submodules: true
rofl0r marked this conversation as resolved.
Show resolved Hide resolved

- 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 .
rofl0r marked this conversation as resolved.
Show resolved Hide resolved
TARBALL=$PKGNAME.tar.xz
tar cJf $TARBALL $PKGNAME
echo "::set-output name=tarball::$TARBALL"

- name: upload tarball
uses: actions/upload-release-asset@v1
unknownbrackets marked this conversation as resolved.
Show resolved Hide resolved
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/gzip
rofl0r marked this conversation as resolved.
Show resolved Hide resolved