Skip to content

Add input.json to inputs.json fallback when file is missing #13

Add input.json to inputs.json fallback when file is missing

Add input.json to inputs.json fallback when file is missing #13

Workflow file for this run

name: Build and Release
on:
push:
tags:
- 'v*'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.25.4'
cache-dependency-path: go.sum
- name: Get version from tag
id: get_version
run: |
if [[ "${{ github.ref }}" == refs/tags/* ]]; then
VERSION=${GITHUB_REF#refs/tags/}
else
VERSION="dev-$(git rev-parse --short HEAD)"
fi
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "tag=$VERSION" >> $GITHUB_OUTPUT
- name: Build binary
env:
GOOS: linux
GOARCH: amd64
CGO_ENABLED: 0
run: |
go build -o spec -ldflags="-w -s -X github.com/hydrocode-de/gotap/cmd.Version=${{ steps.get_version.outputs.version }}" .
- name: Create Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ steps.get_version.outputs.tag }}
name: Release ${{ steps.get_version.outputs.version }}
body_path: RELEASE.md
files: spec
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}