Skip to content

Commit

Permalink
simplify github actions workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
seriousben committed Dec 18, 2024
1 parent 9730d83 commit 65a45ec
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 56 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Test - Build Docker Indexify Server
name: Build Indexify Server Release Packages

on:
workflow_call:
push:
branches:
- 'main'
Expand Down
55 changes: 0 additions & 55 deletions .github/workflows/generate.yml

This file was deleted.

56 changes: 56 additions & 0 deletions .github/workflows/publish_indexify_server_copy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Publish Indexify Binaries COPY

on:
pull_request:
branches:
- 'main'
paths:
- 'server/**'
- '.github/workflows/test_build_docker_indexify_server_workflow.yaml'

env:
CARGO_TERM_COLOR: always

defaults:
run:
working-directory: ./server

jobs:
build-release-packages:
uses: ./.github/workflows/build_indexify_server_release_packages.yaml

extract-version:
name: Extract Version Number
runs-on: ubuntu-latest
outputs:
version: ${{ steps.version_extraction.outputs.version }}
steps:
- uses: actions/checkout@v4
- id: version_extraction
run: echo "version=$(cargo metadata --format-version 1 | jq '.packages[] | select(.name == "indexify-server") | .version' | xargs)" >> "$GITHUB_OUTPUT"

create-release:
name: Create GitHub Release
runs-on: ubuntu-latest
needs:
- build-release-packages
- extract-version
steps:
- uses: actions/checkout@v4
- run: mkdir -p /tmp/release
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
path: /tmp/release/
- name: List Artifacts
run: ls -la /tmp/release
- name: Name Artifacts
run: |
# mv /tmp/release/indexify-server-windows-amd64.exe/indexify-server.exe /tmp/release/indexify-server-${{ needs.extract-version.outputs.version }}-windows-amd64.exe
mv /tmp/release/indexify-server-darwin-arm64/indexify-server /tmp/release/indexify-server-${{ needs.extract-version.outputs.version }}-darwin-arm64
# mv /tmp/release/indexify-server-darwin-amd64/indexify-server /tmp/release/indexify-server-${{ needs.extract-version.outputs.version }}-darwin-amd64
mv /tmp/release/indexify-server-linux-amd64/indexify-server /tmp/release/indexify-server-${{ needs.extract-version.outputs.version }}-linux-amd64
mv /tmp/release/indexify-server-deb-linux-amd64/indexify-server_${{ needs.extract-version.outputs.version }}-1_amd64.deb /tmp/release/indexify-server-${{ needs.extract-version.outputs.version }}-linux-amd64.deb
mv /tmp/release/indexify-server-deb-linux-aarch64/indexify-server_${{ needs.extract-version.outputs.version }}-1_arm64.deb /tmp/release/indexify-server-${{ needs.extract-version.outputs.version }}-linux-arm64.deb
- name: List Artifacts
run: ls -la /tmp/release

0 comments on commit 65a45ec

Please sign in to comment.