]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
[GHA] Add source tarball generation workflow src-tarball 3019/head
authors3rj1k <evasive.gyron@gmail.com>
Fri, 8 May 2026 17:58:36 +0000 (19:58 +0200)
committers3rj1k <evasive.gyron@gmail.com>
Fri, 8 May 2026 18:45:08 +0000 (20:45 +0200)
.github/workflows/tarball.yml [new file with mode: 0644]

diff --git a/.github/workflows/tarball.yml b/.github/workflows/tarball.yml
new file mode 100644 (file)
index 0000000..206cf28
--- /dev/null
@@ -0,0 +1,83 @@
+name: Release generic source archives
+
+on:
+  push:
+    branches:
+      - 'v1.10'
+      - 'v1.11'
+
+jobs:
+  source:
+    runs-on: ubuntu-latest
+
+    permissions:
+      id-token: write
+      contents: read
+
+    steps:
+      - name: Checkout code
+        uses: actions/checkout@v6
+        with:
+          path: 'code'
+
+      - name: Checkout reusable actions
+        uses: actions/checkout@v6
+        with:
+          repository: signalwire/actions-template
+          ref: main
+          fetch-depth: 1
+          path: actions
+          sparse-checkout: |
+            .github/actions/teleport/action.yml
+          sparse-checkout-cone-mode: false
+
+      - name: Install dependencies
+        shell: bash
+        env:
+          DEBIAN_FRONTEND: noninteractive
+        run: |
+          sudo apt-get update && sudo apt-get install -y \
+            devscripts \
+            libtool \
+            libtool-bin \
+            zip \
+            tar \
+            gzip \
+            bzip2 \
+            xz-utils
+
+      - name: Run source tarball script
+        shell: bash
+        working-directory: ./code
+        run: ./scripts/ci/src_tarball.sh
+
+      - name: Generate checksums
+        shell: bash
+        working-directory: ./code/../src_dist
+        run: |
+          find . \( -iname '*.tar.bz2' -o -iname '*.tar.gz' -o -iname '*.tar.xz' -o -iname '*.zip' \) | while read file; do
+            echo $(md5sum $(basename $file)) > $file.md5
+            echo $(sha1sum $(basename $file)) > $file.sha1
+            echo $(sha256sum $(basename $file)) > $file.sha256
+          done
+
+      - name: Pack source archives directory
+        shell: bash
+        run: tar -czvf source_archives.tar.gz -C ./code/../src_dist .
+
+      - name: List contents
+        shell: bash
+        run: |
+          tar -tvzf source_archives.tar.gz
+
+      - name: Upload source tarball to remote host
+        uses: ./actions/.github/actions/teleport
+        with:
+          EXEC_COMMANDS_PRE: 'mkdir -p /var/www/freeswitch/public/release/${{ github.ref_name }}/${{ github.run_id }}-${{ github.run_number }}'
+          FILES: 'source_archives.tar.gz'
+          FILES_FOLDER: '/var/www/freeswitch/public/release/${{ github.ref_name }}/${{ github.run_id }}-${{ github.run_number }}'
+        env:
+          HOSTNAME: ${{ secrets.HOSTNAME }}
+          PROXY_URL: ${{ secrets.PROXY_URL }}
+          TOKEN: ${{ secrets.TELEPORT_TOKEN }}
+          USERNAME: ${{ secrets.USERNAME }}