Skip to content

Commit af80081

Browse files
committed
Add workflow for automating GitHub/PGXN releases
1 parent c4443d9 commit af80081

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

.github/workflows/release.yml

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Release
2+
on:
3+
push:
4+
tags: [v*]
5+
jobs:
6+
release:
7+
name: Release on GitHub and PGXN
8+
runs-on: ubuntu-latest
9+
container: pgxn/pgxn-tools
10+
env:
11+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
12+
PGXN_USERNAME: ${{ secrets.PGXN_USERNAME }}
13+
PGXN_PASSWORD: ${{ secrets.PGXN_PASSWORD }}
14+
steps:
15+
- name: Check out the repo
16+
uses: actions/checkout@v4
17+
- name: Install required packages
18+
run: |
19+
sudo apt-get update
20+
sudo apt-get install -y libpq-dev
21+
- name: Bundle the Release
22+
id: bundle
23+
run: pgxn-bundle
24+
- name: Release on PGXN
25+
run: pgxn-release
26+
- name: Generate Release Changes
27+
run: make latest-changes.md
28+
- name: Create GitHub Release
29+
id: release
30+
uses: actions/create-release@v1
31+
with:
32+
tag_name: ${{ github.ref }}
33+
release_name: Release ${{ github.ref }}
34+
body_path: latest-changes.md
35+
- name: Upload Release Asset
36+
uses: actions/upload-release-asset@v1
37+
with:
38+
upload_url: ${{ steps.release.outputs.upload_url }}
39+
asset_path: ./${{ steps.bundle.outputs.bundle }}
40+
asset_name: ${{ steps.bundle.outputs.bundle }}
41+
asset_content_type: application/zip

0 commit comments

Comments
 (0)