Skip to content

Commit 5b22ec4

Browse files
committed
ci: update workflow
1 parent dc14f27 commit 5b22ec4

File tree

3 files changed

+19
-4
lines changed

3 files changed

+19
-4
lines changed

.github/workflows/checks.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ jobs:
8585
run: make test-coverage
8686

8787
- name: Upload coverage to Codecov
88-
if: matrix.os == 'ubuntu-latest' && matrix.go-version == '1.25'
88+
if: matrix.os == 'windows-latest' && matrix.go-version == '1.25'
8989
uses: codecov/codecov-action@v5
9090
with:
91-
files: ./coverage.out
91+
files: ./.coverage/coverage.out
9292
token: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/ci.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,19 @@ jobs:
4242
EXT=".exe"
4343
fi
4444
45+
VERSION=$(git describe --tags --always --dirty 2>/dev/null || echo "dev")
46+
COMMIT=$(git rev-parse --short HEAD 2>/dev/null || echo "unknown")
47+
BUILD_TIME=$(git log -1 --format=%cI 2>/dev/null || echo "unknown")
48+
49+
CGO_ENABLED=0 go build \
50+
-tags "netgo osusergo" \
51+
-ldflags "-s -w -X github.com/Norgate-AV/spc/internal/version.Version=${VERSION} -X github.com/Norgate-AV/spc/internal/version.Commit=${COMMIT} -X github.com/Norgate-AV/spc/internal/version.BuildTime=${BUILD_TIME}" \
52+
-o "spc${EXT}" \
53+
.
54+
4555
- name: Upload build artifacts
4656
uses: actions/upload-artifact@v4
4757
with:
48-
name: spc${{ matrix.goos }}-${{ matrix.goarch }}
58+
name: spc-${{ matrix.goos }}-${{ matrix.goarch }}
4959
path: spc*
5060
retention-days: 30

Makefile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
# Makefile for spc - Crestron SIMPL+ Compiler Wrapper
22

3-
SHELL := C:/Program Files/Git/usr/bin/bash.exe
3+
# Detect OS and set shell accordingly
4+
ifeq ($(OS),Windows_NT)
5+
SHELL := C:/Program Files/Git/usr/bin/bash.exe
6+
else
7+
SHELL := /bin/bash
8+
endif
49

510
# Variables
611
APP_NAME := spc.exe

0 commit comments

Comments
 (0)