Skip to content

ci: Combine build workflows into one, and make tag workflow reuse bui… #7

ci: Combine build workflows into one, and make tag workflow reuse bui…

ci: Combine build workflows into one, and make tag workflow reuse bui… #7

Workflow file for this run

on:
push:
branches:
- feature/captive-portal-ci
tags:
- 'v**'
name: ci-tag
env:
SHOCKLINK_API_DOMAIN: api.shocklink.net
SHOCKLINK_FW_VERSION: ${{ github.ref_name }}
jobs:
build-and-publish:

Check failure on line 16 in .github/workflows/ci-tag.yml

View workflow run for this annotation

GitHub Actions / ci-tag

Invalid workflow file

The workflow is not valid. .github/workflows/ci-tag.yml (Line: 16, Col: 3): The workflow must contain at least one job with no dependencies.
runs-on: ubuntu-latest
needs: build
steps:
- name: Build project
uses: ./.github/workflows/ci-build.yml
- name: Download release notes
uses: actions/checkout@v4
with:
sparse-checkout: |
RELEASE.md
- name: Download internal artifacts
uses: actions/download-artifact@v3
with:
name: merged-firmware.bin
# This step reads a file from repo and use it for body of the release
# This works on any self-hosted runner OS
- name: Read RELEASE.md
id: read_release
shell: bash
run: |
r=$(cat RELEASE.md) # <--- Read release.md (Provide correct path as per your repo)
r="${r//'%'/'%25'}" # Multiline escape sequences for %
r="${r//$'\n'/'%0A'}" # Multiline escape sequences for '\n'
r="${r//$'\r'/'%0D'}" # Multiline escape sequences for '\r'
echo "RELEASE_BODY=$r" >> $GITHUB_OUTPUT # <--- Set environment variable
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: merged-firmware.bin
asset_name: ShockLink.bin
tag: ${{ github.ref }}
body: |
${{ steps.read_release.outputs.RELEASE_BODY }}