Skip to content

Commit

Permalink
finalise build CI (#26)
Browse files Browse the repository at this point in the history
* add build

* [WIP] change how build is triggered

* [WIP] add a test

* [WIP] refactor to phase

* [WIP] add commit step

* Change when to run workflow

* clean code
  • Loading branch information
KaiWaldrant authored Aug 8, 2024
1 parent a956c2b commit b4958ab
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,19 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

on: workflow_dispatch
on:
push:
branches: [ 'main' ]
workflow_dispatch:
inputs:
version:
description: |
The version of the project to build. Example: `1.0.3`.
If not provided, a development build with a version name
based on the branch name will be built. Otherwise, a release
build with the provided version will be built.
required: false

jobs:
# phase 1
Expand Down Expand Up @@ -52,15 +64,12 @@ jobs:
echo "Set target branch to '$TARGET_BRANCH'"
echo "target_branch=$TARGET_BRANCH" >> $GITHUB_OUTPUT
- uses: viash-io/viash-actions/project/build-target@v6
id: build-target
with:
target_branch: ${{ steps.variables.outputs.target_branch }}
version: ${{ steps.variables.outputs.version }}



- name: Deploy to target branch
uses: peaceiris/actions-gh-pages@v4
with:
Expand Down Expand Up @@ -126,13 +135,12 @@ jobs:
- uses: actions/checkout@v4
with:
ref: ${{ needs.target.outputs.target_branch }}
# Add step to copy files to .

- name: Copy executables to root
run: |
echo "Copying directories to root"
cp -r target/executable/common/* .
# Add step to remove unnecessary files
- name: Clean up
run: |
echo "Cleaning up"
Expand Down

0 comments on commit b4958ab

Please sign in to comment.