@@ -23,6 +23,47 @@ concurrency:
2323 cancel-in-progress : true
2424
2525jobs :
26+ source :
27+ name : Source
28+ runs-on : ubuntu-latest
29+ steps :
30+ - name : Prepare
31+ run : |
32+ case ${GITHUB_REF} in
33+ refs/tags/*)
34+ version=${GITHUB_REF#refs/tags/}
35+ ;;
36+ *)
37+ version=${GITHUB_SHA}
38+ ;;
39+ esac
40+ echo "VERSION=${version}" >> ${GITHUB_ENV}
41+ - uses : actions/checkout@v3
42+ with :
43+ submodules : true
44+ path : datafusion-c-${{ env.VERSION }}
45+ - name : Archive
46+ run : |
47+ rm -rf datafusion-c-${VERSION}/.git
48+ tar cvzf datafusion-c-${VERSION}.tar.gz datafusion-c-${VERSION}
49+ zip -r datafusion-c-${VERSION}.zip datafusion-c-${VERSION}
50+ - uses : actions/upload-artifact@v3
51+ with :
52+ name : tar.gz
53+ path : datafusion-c-${{ env.VERSION }}.tar.gz
54+ - uses : actions/upload-artifact@v3
55+ with :
56+ name : zip
57+ path : datafusion-c-${{ env.VERSION }}.zip
58+ - uses : softprops/action-gh-release@v1
59+ if : |
60+ startsWith(github.ref, 'refs/tags/')
61+ with :
62+ body_path : datafusion-c-${{ env.VERSION }}/doc/source/news/${{ env.VERSION }}.md
63+ files : |
64+ datafusion-c-${{ env.VERSION }}.tar.gz
65+ datafusion-c-${{ env.VERSION }}.zip
66+
2667 build :
2768 name : Build
2869 runs-on : ubuntu-22.04
@@ -84,31 +125,29 @@ jobs:
84125 # target: debian-bookworm-arm64
85126 # test-docker-image: arm64v8/debian:bookworm
86127 - label : Ubuntu Focal amd64
87- id : debian -focal-amd64
128+ id : ubuntu -focal-amd64
88129 task-namespace : apt
89130 target : ubuntu-focal
90131 test-docker-image : ubuntu:focal
91132 # - label: Ubuntu Focal arm64
92- # id: debian -focal-arm64
133+ # id: ubuntu -focal-arm64
93134 # task-namespace: apt
94135 # target: ubuntu-focal-arm64
95136 # test-docker-image: arm64v8/ubuntu:focal
96137 - label : Ubuntu Jammy amd64
97- id : debian -jammy-amd64
138+ id : ubuntu -jammy-amd64
98139 task-namespace : apt
99140 target : ubuntu-jammy
100141 test-docker-image : ubuntu:jammy
101142 # - label: Ubuntu Jammy arm64
102- # id: debian -jammy-arm64
143+ # id: ubuntu -jammy-arm64
103144 # task-namespace: apt
104145 # target: ubuntu-jammy-arm64
105146 # test-docker-image: arm64v8/ubuntu:jammy
106147 steps :
107148 - uses : actions/checkout@v3
108149 with :
109150 submodules : true
110- - name : Checkout Arrow
111- uses : actions/checkout@v3
112151 - name : Install dependencies
113152 run : |
114153 sudo apt update
@@ -118,8 +157,7 @@ jobs:
118157 ruby
119158 - name : Update version
120159 if : |
121- !startsWith(github.ref, 'refs/tags/') &&
122- !startsWith(github.ref, 'refs/heads/maintenance/')
160+ !startsWith(github.ref, 'refs/tags/')
123161 run : |
124162 cd package
125163 rake version:update RELEASE_DATE=$(date +%Y-%m-%d)
@@ -145,13 +183,16 @@ jobs:
145183 startsWith(github.ref, 'refs/tags/')
146184 run : |
147185 mkdir -p ${{ matrix.id }}
186+ shopt -s globstar
148187 cp -a package/${{ matrix.task-namespace }}/repositories/**/*.* ${{ matrix.id }}/
149188 tar czf ${{ matrix.id }}.tar.gz ${{ matrix.id }}
189+ echo "VERSION=${GITHUB_REF#refs/tags/}" >> ${GITHUB_ENV}
150190 - name : Upload to release
151191 uses : softprops/action-gh-release@v1
152192 if : |
153193 startsWith(github.ref, 'refs/tags/')
154194 with :
195+ body_path : doc/source/news/${{ env.VERSION }}.md
155196 files : |
156197 ${{ matrix.id }}.tar.gz
157198 - name : Test
@@ -160,4 +201,5 @@ jobs:
160201 --rm \
161202 --volume ${PWD}:/host:ro \
162203 ${{ matrix.test-docker-image }} \
163- /host/package/${{ matrix.task-namespace }}/test.sh
204+ /host/package/${{ matrix.task-namespace }}/test.sh \
205+ local
0 commit comments