Skip to content

Commit 715e21a

Browse files
committed
Fix linux workflow
1 parent bb6674b commit 715e21a

1 file changed

Lines changed: 7 additions & 8 deletions

File tree

.github/workflows/linux.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,24 +18,23 @@ jobs:
1818
- name: Checkout code
1919
uses: actions/checkout@v4
2020

21+
# Add version info if this is a release
22+
- name: Set version info for release
23+
if: startsWith(github.ref, 'refs/tags/')
24+
run: |
25+
VERSION=$(echo ${{ github.ref }} | sed 's/refs\/tags\///')
26+
echo "enum WEBSITINO_VERSION = \"$VERSION\";" >> source/app.d
27+
2128
# Set up Docker build
2229
- name: Build Docker image
2330
run: |
24-
echo "commit: ${GITHUB_SHA::7}" > version
2531
echo "FROM alpine:latest
2632
RUN apk add vim gcc musl-dev ldc dub llvm-libunwind-static openssl-libs-static gzip upx cmake make
2733
WORKDIR /app
2834
COPY . .
2935
CMD [\"dub\", \"build\", \"--build=release\", \"--config=linux-static\"]" > Dockerfile
3036
docker build -t websitino-image .
3137
32-
# Add version info if this is a release
33-
- name: Set version info for release
34-
if: startsWith(github.ref, 'refs/tags/')
35-
run: |
36-
VERSION=$(echo ${{ github.ref }} | sed 's/refs\/tags\///')
37-
echo "enum WEBSITINO_VERSION = \"$VERSION\";" >> source/app.d
38-
3938
# Run the Docker container to build the project
4039
- name: Run Docker container and build project
4140
run: |

0 commit comments

Comments
 (0)