@@ -10,31 +10,8 @@ permissions:
1010 contents : write # Required to upload release assets
1111
1212jobs :
13- release :
14- name : Create Release
15- runs-on : ubuntu-latest
16- steps :
17- - name : Checkout code
18- uses : actions/checkout@v2
19- - name : Create Release
20- id : create_release
21- uses : actions/create-release@v1
22- env :
23- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
24- with :
25- tag_name : ${{ github.ref }}
26- release_name : ${{ github.ref }}
27- body : |
28- Changes in this Release
29- - First Change
30- - Second Change
31- draft : false
32- prerelease : false
33-
3413 build-linux-gnu :
3514 name : release artifacts
36- needs :
37- - release
3815 strategy :
3916 matrix :
4017 extension_name :
@@ -46,13 +23,14 @@ jobs:
4623 postgres : [14, 15, 16, 17, 18]
4724 box :
4825 - { runner: ubuntu-latest, arch: amd64 }
49- - { runner: arm-runner , arch: arm64 }
26+ - { runner: ubuntu-24.04-arm , arch: arm64 }
5027 runs-on : ${{ matrix.box.runner }}
5128 timeout-minutes : 90
5229 steps :
53- - uses : actions/checkout@v3
30+ - uses : actions/checkout@v6
5431
55- - name : build release artifacts
32+ - id : build
33+ name : build release artifacts
5634 run : |
5735 # Add postgres package repo
5836 sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
@@ -129,15 +107,31 @@ jobs:
129107 sudo chmod -R 00755 ${package_dir}
130108 sudo dpkg-deb --build --root-owner-group ${package_dir}
131109
132- - name : Get upload url
133- run : echo UPLOAD_URL=$(curl --silent https://api.github.com/repos/${{ github.repository }}/releases/latest | jq .upload_url --raw-output) >> $GITHUB_ENV
110+ echo "artifact=${package_dir}.deb" >> "$GITHUB_OUTPUT"
134111
135- - name : Upload release asset
136- uses : actions/upload-release-asset@v1
137- env :
138- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
112+ - name : Upload release artifact
113+ uses : actions/upload-artifact@v4
139114 with :
140- upload_url : ${{ env.UPLOAD_URL }}
141- asset_path : ./${{ matrix.extension_name }}-${{ github.ref_name }}-pg${{ matrix.postgres }}-${{ matrix.box.arch }}-linux-gnu.deb
142- asset_name : ${{ matrix.extension_name }}-${{ github.ref_name }}-pg${{ matrix.postgres }}-${{ matrix.box.arch }}-linux-gnu.deb
143- asset_content_type : application/vnd.debian.binary-package
115+ name : ${{ steps.build.outputs.artifact }}
116+ path : ${{ steps.build.outputs.artifact }}
117+ compression-level : 0
118+ if-no-files-found : error
119+
120+ release :
121+ name : Create Release
122+ needs : [build-linux-gnu]
123+ runs-on : ubuntu-latest
124+ steps :
125+ - name : Checkout code
126+ uses : actions/checkout@v6
127+ - name : Download release artifacts
128+ uses : actions/download-artifact@v5
129+ with :
130+ merge-multiple : true
131+ - name : Create Release
132+ uses : softprops/action-gh-release@v2
133+ with :
134+ generate_release_notes : true
135+ draft : false
136+ prerelease : false
137+ files : pg_jsonschema*.deb
0 commit comments