Multibuild #68
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: 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@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- 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, windows-latest] | |
include: | |
- os: ubuntu-latest | |
output-name: sshnp-linux-x64 | |
- os: macOS-latest | |
output-name: sshnp-macos-x64 | |
- os: windows-latest | |
output-name: sshnp-windows-x64 | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d # v1.6.0 | |
- 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@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- 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 }} |