diff options
author | Valery Piashchynski <[email protected]> | 2023-11-23 15:36:03 +0100 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2023-11-23 15:36:03 +0100 |
commit | c2a4c5e86a1280be3ceb4d71fb0bccde0ba859bd (patch) | |
tree | 99db9b7643c5fea9ff54418bc1ac1e2cb321d0f6 | |
parent | f4b263beb8023e5fde63e0471cab476d4abb112f (diff) |
feature: Add support for the ARM64 deb release
Signed-off-by: Valery Piashchynski <[email protected]>
-rw-r--r-- | .github/workflows/release_dep_aarch64.yml | 95 | ||||
-rw-r--r-- | go.mod | 2 | ||||
-rw-r--r-- | go.sum | 4 |
3 files changed, 98 insertions, 3 deletions
diff --git a/.github/workflows/release_dep_aarch64.yml b/.github/workflows/release_dep_aarch64.yml new file mode 100644 index 00000000..1500abfb --- /dev/null +++ b/.github/workflows/release_dep_aarch64.yml @@ -0,0 +1,95 @@ +name: release_dep_arm64 + +on: + release: # Docs: <https://help.github.com/en/articles/events-that-trigger-workflows#release-event-release> + types: + - released + - prereleased + +jobs: + build: + name: Build for ${{ matrix.os }} (${{ matrix.arch }}, ${{ matrix.compiler }}) + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + os: [ linux ] + compiler: [ gcc ] + arch: [ arm64 ] + + steps: + - name: Check out code + uses: actions/checkout@v4 + + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: stable + + - name: Download dependencies + run: go mod download + + - name: Generate builder values + id: values + run: | + echo "version=$(echo ${GITHUB_REF##*/} | sed -e 's/^[vV ]*//')" >> $GITHUB_OUTPUT + echo "timestamp=$(echo $(date +%FT%T%z))" >> $GITHUB_OUTPUT + echo "binary-name=rr" >> $GITHUB_OUTPUT + echo "sign-cert-name=rr.asc" >> $GITHUB_OUTPUT + + - name: Import GPG key + uses: crazy-max/ghaction-import-gpg@v6 + with: + gpg_private_key: ${{ secrets.GPG_SIGNING_KEY }} + passphrase: ${{ secrets.GPG_PASS }} + git_user_signingkey: true + git_commit_gpgsign: false + + - name: Compile binary file + env: + GOOS: ${{ matrix.os }} + GOARCH: ${{ matrix.arch }} + CC: ${{ matrix.compiler }} + GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }} + GPG_PASS: ${{secrets.GPG_PASS}} + CGO_ENABLED: 0 + LDFLAGS: >- + -s + -X github.com/roadrunner-server/roadrunner/v2023/internal/meta.version=${{ steps.values.outputs.version }} + -X github.com/roadrunner-server/roadrunner/v2023/internal/meta.buildTime=${{ steps.values.outputs.timestamp }} + run: | + go build -trimpath -ldflags "$LDFLAGS" -o "./${{ steps.values.outputs.binary-name }}" ./cmd/rr + stat "./${{ steps.values.outputs.binary-name }}" + gpg --detach-sign --armor "./${{ steps.values.outputs.binary-name }}" + + - name: Create DEB dirs + run: | + mkdir -p dist/ubuntu/roadrunner-${{ steps.values.outputs.version }}-linux-arm64/DEBIAN + mkdir -p dist/ubuntu/roadrunner-${{ steps.values.outputs.version }}-linux-arm64/usr/bin + ls -la dist/ubuntu/roadrunner-${{ steps.values.outputs.version }}-linux-arm64 + + - name: Create DEB control file + run: touch dist/ubuntu/roadrunner-${{ steps.values.outputs.version }}-linux-arm64/DEBIAN/control + + - name: Build Debian package + run: | + echo "Package: roadrunner-${{ steps.values.outputs.version }}-linux-arm64.deb" >> dist/ubuntu/roadrunner-${{ steps.values.outputs.version }}-linux-arm64/DEBIAN/control + echo "Version: ${{ steps.values.outputs.version }}" >> dist/ubuntu/roadrunner-${{ steps.values.outputs.version }}-linux-arm64/DEBIAN/control + echo "Section: custom" >> dist/ubuntu/roadrunner-${{ steps.values.outputs.version }}-linux-arm64/DEBIAN/control + echo "Priority: optional" >> dist/ubuntu/roadrunner-${{ steps.values.outputs.version }}-linux-arm64/DEBIAN/control + echo "Architecture: arm64" >> dist/ubuntu/roadrunner-${{ steps.values.outputs.version }}-linux-arm64/DEBIAN/control + echo "Maintainer: roadrunner.dev" >> dist/ubuntu/roadrunner-${{ steps.values.outputs.version }}-linux-arm64/DEBIAN/control + echo "Description: High-performance PHP application server, load-balancer, process manager written in Go and powered with plugins." >> dist/ubuntu/roadrunner-${{ steps.values.outputs.version }}-linux-arm64/DEBIAN/control + + cat dist/ubuntu/roadrunner-${{ steps.values.outputs.version }}-linux-arm64/DEBIAN/control + + cp "./${{ steps.values.outputs.binary-name }}" dist/ubuntu/roadrunner-${{ steps.values.outputs.version }}-linux-arm64/usr/bin/ + dpkg --build dist/ubuntu/roadrunner-${{ steps.values.outputs.version }}-linux-arm64 + + - name: Upload dep to release + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: dist/ubuntu/roadrunner-${{ steps.values.outputs.version }}-linux-arm64.deb + asset_name: roadrunner-${{ steps.values.outputs.version }}-linux-arm64.deb + tag: ${{ github.ref }} @@ -58,7 +58,7 @@ require ( require ( github.com/andybalholm/brotli v1.0.6 // indirect - github.com/aws/aws-sdk-go v1.48.2 // indirect + github.com/aws/aws-sdk-go v1.48.3 // indirect github.com/aws/aws-sdk-go-v2 v1.23.1 // indirect github.com/aws/aws-sdk-go-v2/config v1.25.5 // indirect github.com/aws/aws-sdk-go-v2/credentials v1.16.4 // indirect @@ -52,8 +52,8 @@ github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk5 github.com/andybalholm/brotli v1.0.6 h1:Yf9fFpf49Zrxb9NlQaluyE92/+X7UVHlhMNJN2sxfOI= github.com/andybalholm/brotli v1.0.6/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/aws/aws-sdk-go v1.48.2 h1:Lf7+Y4WmHB0AQLRQZA46diSwDa+LWbwY6IGaYoCVtTc= -github.com/aws/aws-sdk-go v1.48.2/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= +github.com/aws/aws-sdk-go v1.48.3 h1:btYjT+opVFxUbRz+qSCjJe07cdX82BHmMX/FXYmoL7g= +github.com/aws/aws-sdk-go v1.48.3/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= github.com/aws/aws-sdk-go-v2 v1.23.1 h1:qXaFsOOMA+HsZtX8WoCa+gJnbyW7qyFFBlPqvTSzbaI= github.com/aws/aws-sdk-go-v2 v1.23.1/go.mod h1:i1XDttT4rnf6vxc9AuskLc6s7XBee8rlLilKlc03uAA= github.com/aws/aws-sdk-go-v2/config v1.25.5 h1:UGKm9hpQS2hoK8CEJ1BzAW8NbUpvwDJJ4lyqXSzu8bk= |