Skip to content
This repository has been archived by the owner on Apr 24, 2024. It is now read-only.

Don't crash on empty pings (#57) #92

Don't crash on empty pings (#57)

Don't crash on empty pings (#57) #92

Workflow file for this run

name: Publish Docker Image and Native Binaries
on:
push:
branches: "*"
paths:
- .github/workflows/build.yaml
- discord-irc.ts
- lib/**
- deno.*
- Dockerfile
tags: "*.*.*"
jobs:
publish-docker:
name: Publish Docker Image to GitHub Container Registry
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
- name: Extract metadata for container image
uses: docker/metadata-action@v4
id: metadata
with:
images: ghcr.io/${{ github.repository }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha
- name: Build and publish container image
uses: docker/build-push-action@v4
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.metadata.outputs.tags }}
labels: ${{ steps.metadata.outputs.labels }}
publish-binaries:
name: Publish Native Binaries
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
- pi
- windows-latest
- macos-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Deno
if: matrix.os != 'pi'
uses: denoland/setup-deno@v1
with:
deno-version: v1.x
- name: Compile AMD64 binary for Linux
if: matrix.os == 'ubuntu-latest'
run: deno compile --allow-net --allow-env=CONFIG_FILE,DEBUG,VERBOSE,NODE_EXTRA_CA_CERTS --allow-read --allow-write --output discord-irc-linux-amd64 discord-irc.ts
- name: Compile AMD64 binary for Windows
if: matrix.os == 'windows-latest'
run: deno compile --allow-net --allow-env=CONFIG_FILE,DEBUG,VERBOSE,NODE_EXTRA_CA_CERTS --allow-read --allow-write --output discord-irc-windows-amd64.exe discord-irc.ts
- name: Compile AMD64 binary for macOS
if: matrix.os == 'macos-latest'
run: deno compile --allow-net --allow-env=CONFIG_FILE,DEBUG,VERBOSE,NODE_EXTRA_CA_CERTS --allow-read --allow-write --output discord-irc-macos-amd64 discord-irc.ts
- name: Compile ARM64 binary for macOS
if: runner.os == 'macOS'
run: deno compile --allow-net --allow-env=CONFIG_FILE,DEBUG,VERBOSE,NODE_EXTRA_CA_CERTS --allow-read --allow-write --output discord-irc-macos-arm64 --target aarch64-apple-darwin discord-irc.ts
- name: Compile ARM64 binary for Linux
if: runner.os == 'Linux' && matrix.os == 'pi'
run: deno compile --allow-net --allow-env=CONFIG_FILE,DEBUG,VERBOSE,NODE_EXTRA_CA_CERTS --allow-read --allow-write --output discord-irc-linux-arm64 discord-irc.ts
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: ${{ runner.os }}-${{ runner.os == 'macOS' && 'X64-ARM64' || runner.arch }}
path: ./discord-irc-*