v2024.2.0 #14
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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@v5 | |
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/v2024/internal/meta.version=${{ steps.values.outputs.version }} | |
-X github.com/roadrunner-server/roadrunner/v2024/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 }} |