Skip to content

Commit 1fdae7b

Browse files
committed
fixed version handling
1 parent 65e4851 commit 1fdae7b

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

.github/workflows/dmdreader.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
fetch-depth: 0
2020
- id: version
2121
run: |
22-
TAG=`cat version.txt`
22+
TAG=`cat VERSION`
2323
echo "${TAG}"
2424
echo "tag=${TAG}" >> $GITHUB_OUTPUT
2525
- name: Check git tag
@@ -28,7 +28,7 @@ jobs:
2828
GIT_TAG="${GITHUB_REF#refs/tags/}"
2929
EXPECTED_TAG="v${{ steps.version.outputs.tag }}"
3030
if [[ "${GIT_TAG}" != "${EXPECTED_TAG}" ]]; then
31-
echo "Error: Git tag (${GIT_TAG}) does not match version from version.txt (v${{ steps.version.outputs.tag }})"
31+
echo "Error: Git tag (${GIT_TAG}) does not match version string from VERSION file (v${{ steps.version.outputs.tag }})"
3232
exit 1
3333
fi
3434
@@ -65,7 +65,9 @@ jobs:
6565
path: |
6666
dmdreader.elf
6767
dmdreader.uf2
68-
version.txt
68+
VERSION
69+
LICENSE
70+
README.md
6971
7072
post-build:
7173
runs-on: ubuntu-latest
@@ -75,7 +77,10 @@ jobs:
7577
- uses: actions/download-artifact@v4
7678
- name: Package
7779
if: startsWith(github.ref, 'refs/tags/v')
78-
run: zip dmdreader-${{ needs.version.outputs.tag }}
80+
run: |
81+
cd dmdreader-${{ needs.version.outputs.tag }}
82+
zip ../dmdreader-${{ needs.version.outputs.tag }}.zip dmdreader.elf dmdreader.uf2 VERSION LICENSE README.md
83+
cd ..
7984
8085
- name: Release
8186
uses: softprops/action-gh-release@v1

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ cmake_minimum_required(VERSION 3.13)
55
set(CMAKE_C_STANDARD 11)
66
set(CMAKE_CXX_STANDARD 17)
77

8-
file(READ version.txt VERSION_STRING)
8+
file(READ VERSION VERSION_STRING)
99
string(STRIP "${VERSION_STRING}" VERSION_STRING)
1010

1111
# Initialise pico_sdk from installed location

version.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)