Skip to content

chore: Update git push command to use 'main' branch instead of '<bran… #29

chore: Update git push command to use 'main' branch instead of '<bran…

chore: Update git push command to use 'main' branch instead of '<bran… #29

name: Release Binaries
on:
push:
branches-ignore:
- '**'
tags:
- '*'
workflow_dispatch:
jobs:
changelog:
name: Generate changelog
runs-on: ubuntu-latest
outputs:
release_body: ${{ steps.git-cliff.outputs.content }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Generate a changelog
uses: orhun/git-cliff-action@v3
with:
config: ./cliff.toml
args: -vv --latest --strip header
env:
OUTPUT: CHANGELOG.md
GITHUB_REPO: ${{ github.repository }}
- name: Commit
run: |
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
set +e
git add CHANGELOG.md
git commit -m "Update changelog"
git push https://${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git main
build_binaries:
runs-on: ubuntu-latest
needs: changelog
strategy:
matrix:
include:
- command: ENGINE=podman DISTRO=ubuntu-2004 ZIP=1 ./scripts/binaries/build.sh
output_file: output/zips/x86_64-ubuntu-2004-unc-node.tar.gz
- command: ENGINE=podman DISTRO=ubuntu-2204 ZIP=1 ./scripts/binaries/build.sh
output_file: output/zips/x86_64-ubuntu-2204-unc-node.tar.gz
- command: ENGINE=podman DISTRO=ubuntu-2404 ZIP=1 ./scripts/binaries/build.sh
output_file: output/zips/x86_64-ubuntu-2404-unc-node.tar.gz
# - command: ENGINE=podman DISTRO=fedora-39 ZIP=1 ./scripts/binaries/build.sh
# output_file: output/zips/x86_64-fedora-39-unc-node.tar.gz
# - command: ENGINE=podman DISTRO=fedora-40 ZIP=1 ./scripts/binaries/build.sh
# output_file: output/zips/x86_64-fedora-40-unc-node.tar.gz
- command: ENGINE=podman DISTRO=debian-11 ZIP=1 ./scripts/binaries/build.sh
output_file: output/zips/x86_64-debian-11-unc-node.tar.gz
- command: ENGINE=podman DISTRO=debian-12 ZIP=1 ./scripts/binaries/build.sh
output_file: output/zips/x86_64-debian-12-unc-node.tar.gz
- command: ENGINE=podman DISTRO=arch ZIP=1 ./scripts/binaries/build.sh
output_file: output/zips/x86_64-arch-unc-node.tar.gz
steps:
- uses: actions/checkout@v4
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
tool-cache: true
- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
version: '3.x'
- name: install podman
run: sudo apt-get update && sudo apt install podman -y
- uses: nick-fields/retry@v3
with:
timeout_minutes: 60
max_attempts: 3
command: ${{ matrix.command }}
- name: Prepare
id: prepare
run: |
TAG=${GITHUB_REF#refs/tags/}
echo "tag_name=${TAG}" >> $GITHUB_OUTPUT
- name: publish binary
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ matrix.output_file }}
release_name: ${{ steps.prepare.outputs.tag_name }}
tag: ${{ steps.prepare.outputs.tag_name }}
body: ${{ needs.changelog.outputs.release_body }}
overwrite: true