Skip to content

merged

merged #30

Workflow file for this run

name: Generate and Release
on:
push:
branches:
- master
jobs:
build-lib:
runs-on: ubuntu-latest
strategy:
matrix:
version: [23.11]
steps:
- uses: cachix/install-nix-action@v23
- name: Get branch names
id: branch-name
uses: tj-actions/branch-names@v7
- name: Get current date and time
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%dT%H_%M_%S')"
- uses: actions/checkout@v4
with:
repository: hytech-racing/HT_proto
ref: refs/heads/master
- run: nix run .#nanopb-runner -- ${{ steps.date.outputs.date }}
- name: create release artifact
run: |
mkdir -p hytech_msgs_pb_lib
mv *.pb.* hytech_msgs_pb_lib
mv hytech_msgs_version.h hytech_msgs_pb_lib
echo -e "{\n\"name\": \"hytech_msgs_pb_lib\",\n\"version\": \"1.${{ github.run_number }}.0\"\n}" >> hytech_msgs_pb_lib/library.json
tar -czvf hytech_msgs_pb_lib.tar.gz hytech_msgs_pb_lib
- name: Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ steps.date.outputs.date }}
files: |
hytech_msgs_pb_lib.tar.gz
./proto/base_msgs.proto
./proto/hytech_msgs.proto