Skip to content

Multibuild

Multibuild #60

Workflow file for this run

name: Multibuild
on:
workflow_dispatch:
permissions: # added using https://github.com/step-security/secure-repo
contents: read
jobs:
verify_tags:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
- uses: ./.github/composite/verify_cli_tags
x64_build:
needs: verify_tags
runs-on: ${{ matrix.os }}
defaults:
run:
working-directory: ./packages/sshnoports
strategy:
matrix:
os: [ubuntu-latest, macOS-latest]
include:
- os: ubuntu-latest
output-name: sshnp-linux-x64
- os: macOS-latest
output-name: sshnp-macos-x64
steps:
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
- uses: dart-lang/setup-dart@8a4b97ea2017cc079571daec46542f76189836b1 # v1.5.1
- run: mkdir sshnp
- run: mkdir tarball
- run: dart pub get
- run: dart run build_runner build --delete-conflicting-outputs
- run: dart compile exe bin/activate_cli.dart -v -o sshnp/at_activate
- run: dart compile exe bin/sshnp.dart -v -o sshnp/sshnp
- run: dart compile exe bin/sshnpd.dart -v -o sshnp/sshnpd
- run: dart compile exe bin/sshrv.dart -v -o sshnp/sshrv
- run: dart compile exe bin/sshrvd.dart -v -o sshnp/sshrvd
- run: cp -r templates sshnp/templates
- run: cp LICENSE sshnp
- run: tar -cvzf tarball/${{ matrix.output-name }}.tgz sshnp
- uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
with:
name: x64_binaries
path: ./packages/sshnoports/tarball/${{ matrix.output-name }}.tgz
if-no-files-found: error
other_build:
needs: verify_tags
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./packages/sshnoports
strategy:
matrix:
platform: [linux/arm/v7, linux/arm64, linux/riscv64]
include:
- platform: linux/arm/v7
output-name: sshnp-linux-arm
- platform: linux/arm64
output-name: sshnp-linux-arm64
- platform: linux/riscv64
output-name: sshnp-linux-riscv64
steps:
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
- uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0
- uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0
- run: |
docker buildx build -t atsigncompany/sshnptarball -f tools/Dockerfile.package \
--platform ${{ matrix.platform }} -o type=tar,dest=bins.tar .
- run: mkdir tarballs
- run: tar -xvf bins.tar -C tarballs
- uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
with:
name: other_binaries
path: ./packages/sshnoports/tarballs/${{ matrix.output-name }}.tgz
if-no-files-found: error
notify_on_completion:
needs: [x64_build, other_build]
runs-on: ubuntu-latest
steps:
- name: Google Chat Notification
uses: Co-qn/google-chat-notification@3691ccf4763537d6e544bc6cdcccc1965799d056 # v1
with:
name: SSH no ports binaries were built by GitHub Action ${{ github.run_number }}
url: ${{ secrets.GOOGLE_CHAT_WEBHOOK }}
status: ${{ job.status }}
notify_on_failure:
if: failure()
needs: [x64_build, other_build]
runs-on: ubuntu-latest
steps:
- name: Google Chat Notification
uses: Co-qn/google-chat-notification@3691ccf4763537d6e544bc6cdcccc1965799d056 # v1
with:
name: SSH no ports binaries build FAILED by GitHub Action ${{ github.run_number }}
url: ${{ secrets.GOOGLE_CHAT_WEBHOOK }}
status: ${{ job.status }}