diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml new file mode 100644 index 0000000..0da61e6 --- /dev/null +++ b/.gitea/workflows/build.yaml @@ -0,0 +1,39 @@ +name: Build Clash +on: push + +permissions: + code: read + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Check out repository code + uses: actions/checkout@v6 + - name: Install lisp + run: | + apt-get update + apt-get install -y sbcl cl-quicklisp make + mkdir -p ~/quicklisp/ + ln -s "${{ gitea.workspace }}" ~/quicklisp/local-projects + - name: Build + run: | + make -C "${{ gitea.workspace }}/clash" + - name: Prepare archive + run: | + mkdir usr/ + target="${PWD}/usr" + cd "${{ gitea.workspace }}/clash" + make PREFIX="${target}" install + - name: Make artifact name + id: name + run: | + short_sha="$(git rev-parse --short HEAD)" + branch="${{ github.head_ref || github.ref_name }}" + echo "name=chash-${branch}-${short_sha}" >> "$GITEA_OUTPUT" + - name: Upload Artifacts + uses: actions/upload-artifact@v3 + with: + path: usr/ + name: clash--${{ steps.name.outputs.name }} + archive: true