Skip to content

Commit ddd9490

Browse files
committed
Add source distribution to release building action.
1 parent 871799c commit ddd9490

3 files changed

Lines changed: 32 additions & 6 deletions

File tree

.github/workflows/make-tests.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
name: Regression tests
22

33
on:
4-
push:
5-
branches: [ master ]
6-
pull_request:
7-
branches: [ master ]
4+
# push:
5+
# branches: [ master ]
6+
# pull_request:
7+
# branches: [ master ]
88

99
jobs:
1010

.github/workflows/release.yml

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
name: Build/publish release binaries (Linux, Mac)
22

3+
# Also build/publish a prism-X.Y-src.tar.gz
4+
35
on:
6+
push:
7+
branches: [ master ]
8+
pull_request:
9+
branches: [ master ]
410
# push:
511
# # Trigger on version tags: v4.10 etc.
612
# tags:
@@ -20,6 +26,25 @@ on:
2026

2127
jobs:
2228

29+
build_src:
30+
runs-on: ubuntu-latest
31+
steps:
32+
- uses: actions/checkout@v4
33+
with:
34+
# Use the tag from manual input, otherwise fall back to the git ref
35+
ref: ${{ github.event.inputs.tag_name || github.ref }}
36+
fetch-depth: 0 # Fetches all tags and history
37+
- name: Build source
38+
shell: bash
39+
working-directory: ./prism
40+
run: |
41+
make release_source BRANCH=HEAD
42+
- name: Upload artifact
43+
uses: actions/upload-artifact@v4
44+
with:
45+
name: prism-src
46+
path: prism/release/*.tar.gz
47+
2348
build:
2449
strategy:
2550
matrix:
@@ -90,7 +115,7 @@ jobs:
90115
etc/tests/run.sh
91116
92117
publish:
93-
needs: [build, test_release]
118+
needs: [build_src, build, test_release]
94119
runs-on: ubuntu-latest
95120
permissions:
96121
# Crucial for creating releases

prism/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -625,11 +625,12 @@ build_release:
625625
release_source: release_check_version build_release_source
626626

627627
build_release_source:
628-
@echo Creating source distribution from branch "$(BRANCH)" in "release/$(SRC_DIST_FILE)"... && \
628+
echo Creating source distribution from branch "$(BRANCH)" in "release/$(SRC_DIST_FILE)"... && \
629629
mkdir -p release && \
630630
rm -rf "release/$(SRC_DIST_DIR)" && \
631631
rm -f "release/$(SRC_DIST_FILE)" && \
632632
mkdir -p "release/$(SRC_DIST_DIR)" && \
633+
git branch --v && \
633634
(cd .. && git archive $(BRANCH) --format=tar) | tar xf - -C "release/$(SRC_DIST_DIR)" && \
634635
(cd release && tar cfz "$(SRC_DIST_FILE)" "$(SRC_DIST_DIR)") && rm -rf "release/$(SRC_DIST_DIR)"
635636

0 commit comments

Comments
 (0)