Skip to content

Commit

Permalink
Add release action
Browse files Browse the repository at this point in the history
  • Loading branch information
erikbosch committed Sep 16, 2024
1 parent 64fd562 commit a03a7c6
Show file tree
Hide file tree
Showing 3 changed files with 94 additions and 2 deletions.
21 changes: 20 additions & 1 deletion .github/workflows/buildcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@ on:
push:
pull_request:
workflow_dispatch:
inputs:
vss-version:
required: false
type: string
workflow_call:
inputs:
vss-version:
required: false
type: string

jobs:
buildtest:
Expand All @@ -20,13 +29,23 @@ jobs:
python -V
python -m pip --quiet --no-input install --upgrade pip
python -m pip --quiet --no-input install --upgrade wheel
./script/install_vss_tools.sh
./scripts/install_vss_tools.sh
echo done!
- name: Test mandatory targets
run: |
if "${{ inputs.vss-version }}" != ""; then
export VSS_VERSION=${{ inputs.vss-version }}
fi
make mandatory_targets
- name: "Uploading artifacts"
uses: actions/upload-artifact@v4
with:
name: vss-artifacts
path: vss.*
if-no-files-found: error

- name: Test that ddsidl is correct
run: |
pip install cyclonedds
Expand Down
71 changes: 71 additions & 0 deletions .github/workflows/create_draft_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# /********************************************************************************
# * Copyright (c) 2024 Contributors to the Eclipse Foundation
# *
# * See the NOTICE file(s) distributed with this work for additional
# * information regarding copyright ownership.
# *
# * This program and the accompanying materials are made available under the
# * terms of the Apache License 2.0 which is available at
# * http://www.apache.org/licenses/LICENSE-2.0
# *
# * SPDX-License-Identifier: Apache-2.0
# ********************************************************************************/

name: Create Draft Release

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

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

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

jobs:
call_kuksa_databroker_build:
uses: ./.github/workflows/buildcheck.yml
with:
vss-version: ${{ inputs.vss-version }}

create_release:
runs-on: ubuntu-latest
needs:
[
call_kuksa_databroker_build
]
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: build-artifacts
# Only packed binaries shall start with "databroker"
# As of now do not upload separate dash and third party reports
pattern: vss.*
merge-multiple: true
- name: Display structure of downloaded files
run: |
ls -R build-artifacts
- 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 }}
fail_on_unmatched_files: true
files: |
build-artifacts/*
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ mandatory_targets: clean json json-noexpand franca yaml binary csv graphql ddsid
optional_targets: clean protobuf ttl binary

TOOLSDIR?=./vss-tools
VSS_VERSION ?= 0.0
COMMON_ARGS=-u ./spec/units.yaml --strict
COMMON_VSPEC_ARG=-s ./spec/VehicleSignalSpecification.vspec

Expand All @@ -32,7 +33,8 @@ jsonschema:
vspec export jsonschema ${COMMON_ARGS} ${COMMON_VSPEC_ARG} -o vss_rel_.jsonschema

franca:
vspec export franca --franca-vss-version $$(cat VERSION) ${COMMON_ARGS} ${COMMON_VSPEC_ARG} -o vss_.fidl

vspec export franca --franca-vss-version $(VSS_VERSION) ${COMMON_ARGS} ${COMMON_VSPEC_ARG} -o vss_.fidl

yaml:
vspec export yaml ${COMMON_ARGS} ${COMMON_VSPEC_ARG} -o vss.yaml
Expand Down

0 comments on commit a03a7c6

Please sign in to comment.