From 82b4b083b32768a94617b3060fd4c1276fef2869 Mon Sep 17 00:00:00 2001 From: rofl0r Date: Mon, 14 Jun 2021 02:36:09 +0100 Subject: [PATCH] add github workflow to create release tarball with submodules --- .github/workflows/build_source_release.yml | 39 ++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/build_source_release.yml diff --git a/.github/workflows/build_source_release.yml b/.github/workflows/build_source_release.yml new file mode 100644 index 00000000..3de43ed3 --- /dev/null +++ b/.github/workflows/build_source_release.yml @@ -0,0 +1,39 @@ +name: Build Source Release + +# 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 + + - name: archive + id: archive + run: | + VERSION=${{ github.event.release.tag_name }} + PKGNAME="SoftEtherVPN-$VERSION" + mkdir -p /tmp/$PKGNAME + mv * /tmp/$PKGNAME + mv /tmp/$PKGNAME . + 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/gzip