Skip to content

Commit 06f31ac

Browse files
committed
build: update GitHub workflows & use GitHub public arm64 runner
This change updates the GitHub workflows to up-to-date GitHub actions, uses the recommended `softprops/action-gh-release` instead of the archived and unmaintained `actions/create-release`, and uses the public arm64 runner.
1 parent cabd2ea commit 06f31ac

4 files changed

Lines changed: 33 additions & 39 deletions

File tree

.github/workflows/coverage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
runs-on: ubuntu-latest
1616
steps:
1717
- name: Checkout code
18-
uses: actions/checkout@v4
18+
uses: actions/checkout@v6
1919

2020
- run: |
2121
# Add postgres package repo

.github/workflows/pgxn-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
container: pgxn/pgxn-tools
1515
steps:
1616
- name: Check out the repo
17-
uses: actions/checkout@v4
17+
uses: actions/checkout@v6
1818
- name: Bundle the Release
1919
run: pgxn-bundle
2020
- name: Release on PGXN

.github/workflows/release.yml

Lines changed: 30 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -10,31 +10,8 @@ permissions:
1010
contents: write # Required to upload release assets
1111

1212
jobs:
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

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313

1414
steps:
1515
- name: Checkout code
16-
uses: actions/checkout@v3
16+
uses: actions/checkout@v6
1717

1818
- name: Build docker images
1919
run: docker compose -f .ci/docker-compose.yaml build

0 commit comments

Comments
 (0)