From e723d6dc1f5f9e7f8650909efefd0de9a9284a5d Mon Sep 17 00:00:00 2001
From: Gusabary <Gusabary@126.com>
Date: Sun, 29 Jan 2023 21:55:42 +0800
Subject: [PATCH] chore: add action for old glibc version

---
 .github/workflows/release_old-glibc.yml | 58 +++++++++++++++++++++++++
 1 file changed, 58 insertions(+)
 create mode 100644 .github/workflows/release_old-glibc.yml

diff --git a/.github/workflows/release_old-glibc.yml b/.github/workflows/release_old-glibc.yml
new file mode 100644
index 0000000..ba61c8b
--- /dev/null
+++ b/.github/workflows/release_old-glibc.yml
@@ -0,0 +1,58 @@
+name: Release for glibc 2.17
+
+on:
+  release:
+    types: [ published ]
+
+jobs:
+  release:
+    name: Release
+    runs-on: ubuntu-latest
+    container: quay.io/pypa/manylinux2014_x86_64
+    steps:
+      - name: Print glibc version
+        run: ldd --version
+
+      - name: Checkout sources
+        uses: actions/checkout@v3
+
+      - name: Install stable toolchain
+        uses: actions-rs/toolchain@v1
+        with:
+          profile: minimal
+          toolchain: stable
+          override: true
+
+      - name: Run cargo test
+        uses: actions-rs/cargo@v1
+        with:
+          command: test
+      
+      - name: Run cargo build
+        uses: actions-rs/cargo@v1
+        with:
+          command: build
+          args: --release
+      
+      - name: Create package
+        working-directory: ${{ runner.workspace }}/Arenta/
+        id: package
+        shell: bash
+        run: |
+          mkdir release
+          cp target/release/arenta release/
+          cp README.md release/
+          cp LICENSE release/
+          PACKAGE_NAME=arenta-${GITHUB_REF#refs/tags/}-ubuntu-latest-glibc-2.17.tar.gz
+          tar -czvf $PACKAGE_NAME -C release .
+          echo "name=${PACKAGE_NAME}" >> $GITHUB_OUTPUT
+      
+      - name: Upload asset
+        uses: actions/upload-release-asset@v1
+        env:
+          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+        with:
+          upload_url: ${{ github.event.release.upload_url }}
+          asset_path: ${{ steps.package.outputs.name }}
+          asset_name: ${{ steps.package.outputs.name }}
+          asset_content_type: application/gzip
\ No newline at end of file