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 8ec018f
Show file tree
Hide file tree
Showing 3 changed files with 100 additions and 5 deletions.
36 changes: 33 additions & 3 deletions .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,17 +29,38 @@ 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
# Listing all artifacts that shall be managed as release artifacts
path: |
vss.csv
vss.fidl
vss.grapql.ts
vss.idl
vss.json
vss.jsonschema
vss.yaml
vss_noexpand.json
vss_samm.tar.gz
vss_apigear.tar.gz
if-no-files-found: error

- name: Test that ddsidl is correct
run: |
pip install cyclonedds
idlc vss_rel_*.idl
idlc vss*.idl
- name: Prepare for CSV check
Expand All @@ -43,7 +73,7 @@ jobs:
run: |
# Install csvlint to check compliance with https://datatracker.ietf.org/doc/html/rfc4180
go install github.com/Clever/csvlint/cmd/csvlint@latest
csvlint vss_rel_*.csv
csvlint vss*.csv
- name: Test optional targets. NOTE - always succeeds
run: |
Expand Down
64 changes: 64 additions & 0 deletions .github/workflows/create_draft_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# /********************************************************************************
# * 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 (numerical version), e.g. 4.2, 4.2rc0"
required: true
default: "0.0.0"

# 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
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
with:
draft: true
tag_name: "v${{ inputs.vss-version }}"
fail_on_unmatched_files: true
files: |
build-artifacts/*
spec/units.yaml
spec/quantities.yaml
5 changes: 3 additions & 2 deletions 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 @@ -29,10 +30,10 @@ json-noexpand:
vspec export json ${COMMON_ARGS} --no-expand ${COMMON_VSPEC_ARG} -o vss_noexpand.json

jsonschema:
vspec export jsonschema ${COMMON_ARGS} ${COMMON_VSPEC_ARG} -o vss_rel_.jsonschema
vspec export jsonschema ${COMMON_ARGS} ${COMMON_VSPEC_ARG} -o vss.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 8ec018f

Please sign in to comment.