Add divide chunk fn #11
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: build and upload artifacts | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
workflow_dispatch: | |
workflow_call: | |
inputs: | |
tag_name: | |
type: string | |
description: "The tag name of the release without v prefix" | |
env: | |
VERSION: ${{ inputs.tag_name }} | |
jobs: | |
build: | |
name: build and upload artifacts | |
strategy: | |
matrix: | |
include: | |
- os: windows-2022 | |
arch: amd64 | |
target: windows | |
ext: .exe | |
- os: ubuntu-20.04 | |
arch: amd64 | |
target: linux | |
- os: macos-13 | |
arch: amd64 | |
target: darwin | |
- os: macos-14 | |
arch: arm64 | |
target: darwin | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: installing dependencies | |
uses: ./.github/actions/install | |
with: | |
os: ${{ matrix.os }} | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Check if VERSION exists | |
shell: bash | |
id: check_version | |
run: | | |
if [ ! -z "${{ env.VERSION }}" ]; then | |
echo "PRODUCTION=true" >> $GITHUB_ENV | |
fi | |
- name: Build CLI | |
shell: bash | |
run: task build:cli | |
env: | |
OS: ${{ matrix.target }} | |
ARCH: ${{ matrix.arch }} | |
- name: Upload CLI artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: cli-${{ matrix.target }}-${{ matrix.arch }}-${{ env.VERSION }} | |
path: build/cli${{ matrix.ext }} | |
- name: Build Server | |
shell: bash | |
run: task build:server | |
env: | |
OS: ${{ matrix.target }} | |
ARCH: ${{ matrix.arch }} | |
- name: Upload Server artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: server-${{ matrix.target }}-${{ matrix.arch }}-${{ env.VERSION }} | |
path: build/server${{ matrix.ext }} |