mirror of
https://github.com/aljazceru/ark.git
synced 2026-01-13 16:54:22 +01:00
128 lines
3.8 KiB
YAML
Executable File
128 lines
3.8 KiB
YAML
Executable File
name: Release ark
|
|
|
|
on:
|
|
release:
|
|
types: [released]
|
|
|
|
|
|
permissions:
|
|
contents: write
|
|
packages: write
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v2
|
|
with:
|
|
go-version: 1.21.0
|
|
|
|
- name: Build binaries
|
|
run: make build-all
|
|
|
|
- name: Upload server binary (Linux, AMD64)
|
|
uses: actions/upload-release-asset@v1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
upload_url: ${{ github.event.release.upload_url }}
|
|
asset_path: ./server/build/arkd-linux-amd64
|
|
asset_name: arkd-linux-amd64
|
|
asset_content_type: application/octet-stream
|
|
|
|
- name: Upload server binary (Linux, ARM)
|
|
uses: actions/upload-release-asset@v1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
upload_url: ${{ github.event.release.upload_url }}
|
|
asset_path: ./server/build/arkd-linux-arm64
|
|
asset_name: arkd-linux-arm
|
|
asset_content_type: application/octet-stream
|
|
|
|
- name: Upload server binary (Darwin, AMD64)
|
|
uses: actions/upload-release-asset@v1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
upload_url: ${{ github.event.release.upload_url }}
|
|
asset_path: ./server/build/arkd-darwin-amd64
|
|
asset_name: arkd-darwin-amd64
|
|
asset_content_type: application/octet-stream
|
|
|
|
- name: Upload server binary (Darwin, ARM)
|
|
uses: actions/upload-release-asset@v1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
upload_url: ${{ github.event.release.upload_url }}
|
|
asset_path: ./server/build/arkd-darwin-arm64
|
|
asset_name: arkd-darwin-arm
|
|
asset_content_type: application/octet-stream
|
|
|
|
# CLI
|
|
- name: Upload client binary (Linux, AMD64)
|
|
uses: actions/upload-release-asset@v1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
upload_url: ${{ github.event.release.upload_url }}
|
|
asset_path: ./client/build/ark-linux-amd64
|
|
asset_name: ark-linux-amd64
|
|
asset_content_type: application/octet-stream
|
|
|
|
- name: Upload client binary (Linux, ARM)
|
|
uses: actions/upload-release-asset@v1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
upload_url: ${{ github.event.release.upload_url }}
|
|
asset_path: ./client/build/ark-linux-arm64
|
|
asset_name: ark-linux-arm
|
|
asset_content_type: application/octet-stream
|
|
|
|
- name: Upload client binary (Darwin, AMD64)
|
|
uses: actions/upload-release-asset@v1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
upload_url: ${{ github.event.release.upload_url }}
|
|
asset_path: ./client/build/ark-darwin-amd64
|
|
asset_name: ark-darwin-amd64
|
|
asset_content_type: application/octet-stream
|
|
|
|
- name: Upload client binary (Darwin, ARM)
|
|
uses: actions/upload-release-asset@v1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
upload_url: ${{ github.event.release.upload_url }}
|
|
asset_path: ./client/build/ark-darwin-arm64
|
|
asset_name: ark-darwin-arm
|
|
asset_content_type: application/octet-stream
|
|
|
|
|
|
# Docker
|
|
|
|
- name: Set up Docker
|
|
uses: docker/setup-buildx-action@v1
|
|
|
|
- name: Login to GitHub Container Registry
|
|
uses: docker/login-action@v1
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Build and push Docker image
|
|
uses: docker/build-push-action@v2
|
|
with:
|
|
context: .
|
|
push: true
|
|
tags: ghcr.io/${{ github.repository }}:${{ github.event.release.tag_name }}
|
|
platforms: linux/amd64,linux/arm64 |