Skip to content

test release ci with latest release commit #3

test release ci with latest release commit

test release ci with latest release commit #3

Workflow file for this run

name: Release Clementine Binary
on:
push:
tags:
- "v*.*.*"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
x86_64_binary_extraction:
runs-on: ubicloud-standard-4
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Build Docker image
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
push: false
load: true
tags: clementine:latest
platforms: linux/amd64
- name: Run and extract binary
run: |
docker run -d --name test-container --entrypoint /bin/sh clementine:latest -c "while true; do sleep 30; done"
mkdir release
docker cp test-container:/clementine/target/release/server release/server
- name: Upload x86_64 Binary
uses: actions/upload-artifact@v4
with:
name: clementine_${{ github.ref_name }}_x86_64
path: release/server
linux_arm64_binary_extraction:
runs-on: ubicloud-standard-4-arm
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Build Docker image
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
push: false
load: true
tags: clementine:latest
platforms: linux/arm64
- name: Run and extract binary
run: |
docker run -d --name test-container --entrypoint /bin/sh clementine:latest -c "while true; do sleep 30; done"
mkdir release
docker cp test-container:/clementine/target/release/server release/server
- name: Upload ARM64 Binary
uses: actions/upload-artifact@v4
with:
name: clementine_${{ github.ref_name }}_linux_arm64
path: release/server
release:
needs: [x86_64_binary_extraction, linux_arm64_binary_extraction]
runs-on: ubuntu-latest
steps:
- name: Download x86_64 Binary
uses: actions/download-artifact@v4
with:
name: clementine_${{ github.ref_name }}_x86_64
path: release
- name: rename file
run: |
mv release/server release/clementine_${{ github.ref_name }}_x86_64
- name: Download Linux ARM64 Binary
uses: actions/download-artifact@v4
with:
name: clementine_${{ github.ref_name }}_linux_arm64
path: release
- name: rename file
run: |
mv release/server release/clementine_${{ github.ref_name }}_linux_arm64
- name: Release
uses: softprops/action-gh-release@v2
with:
files: |
release/clementine_${{ github.ref_name }}_linux_arm64
release/clementine_${{ github.ref_name }}_x86_64
name: Release ${{ github.ref_name }}
body: |
This is the release for version ${{ github.ref_name }}.
It includes:
- clementine_${{ github.ref_name }}_linux_arm64
- clementine_${{ github.ref_name }}_x86_64