Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix broke no default feat #6

Open
wants to merge 15 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 5 additions & 34 deletions .github/workflows/create_draft_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,43 +14,16 @@
name: Create Draft Release

on:
workflow_dispatch: # input version manually. Overrides push tag
inputs:
tag:
description: "Release version, eg:latest, 0.2.1"
required: true
default: "0.0.0"

# As of today trigger only manually
#push:
# tags:
# - "*.*.*"
push:
tags:
- "*.*.*"

# Needed if GITHUB_TOKEN by default do not have right to create release
permissions:
contents: write
packages: write

jobs:
get_version:
runs-on: ubuntu-latest
# Map a step output to a job output
outputs:
version: ${{ steps.eval_version.outputs.version }}
steps:
- name: Get tag or user release version
id: eval_version
run: |
GIT_VER="${GITHUB_REF/refs\/tags\//}"
echo "### Detected tag: $GIT_VER"
if [ -n "${{ github.event.inputs.tag }}" ]; then
GIT_VER="${{ github.event.inputs.tag }}"
echo "Forced release version: $GIT_VER"
echo "version=${GIT_VER}" >> $GITHUB_OUTPUT
else
echo "version=${GIT_VER}" >> $GITHUB_OUTPUT
fi

call_kuksa_databroker_build:
uses: ./.github/workflows/kuksa_databroker_build.yml
secrets:
Expand All @@ -66,7 +39,6 @@ jobs:
runs-on: ubuntu-latest
needs:
[
get_version,
call_kuksa_databroker_build,
call_kuksa_databroker-cli_build,
]
Expand All @@ -87,16 +59,15 @@ jobs:
ls -R build-artifacts
cd build-artifacts
# Rename, add release name (usually tag)
for f in databroker*.tar.gz; do mv "$f" "$(echo "$f" | sed s/.tar.gz/-${{ needs.get_version.outputs.version }}.tar.gz/)"; done

for f in databroker*.tar.gz; do mv "$f" "$(echo "$f" | sed s/.tar.gz/-${{ github.ref_name }}.tar.gz/)"; done

- name: Create release
id: create_release
uses: softprops/action-gh-release@v2
# if: startsWith(github.ref, 'refs/tags/'
with:
draft: true
tag_name: KUKSA Databroker ${{ needs.get_version.outputs.version }}
name: KUKSA Databroker ${{ github.ref_name }}
fail_on_unmatched_files: true
files: |
build-artifacts/*
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/kuksa_databroker_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ on:
QUAY_IO_USERNAME:
required: true
workflow_dispatch:
# Run every Sunday night to check regressions, for example from clippy
schedule:
- cron: "0 4 * * 0"

# suffix to avoid cancellation when running from release workflow
concurrency:
Expand Down Expand Up @@ -157,6 +160,9 @@ jobs:
# Needed for pip
with:
python-version: '3.12'
- uses: taiki-e/[email protected]
with:
tool: [email protected]
- name: Install build prerequisites
working-directory: ${{github.workspace}}/
run: |
Expand All @@ -170,6 +176,10 @@ jobs:
run: |
./scripts/build-databroker.sh ${{ matrix.platform.name }}

- name: "Check each feature"
working-directory: ${{github.workspace}}
run: cargo hack check --each-feature

- name: "Archiving artifacts"
shell: bash
working-directory: ${{github.workspace}}/dist/${{ matrix.platform.name }}
Expand Down
Loading
Loading