-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add workflow to release on GitHub/PGXN
- Loading branch information
Tomas Vondra
committed
Dec 22, 2024
1 parent
c52ea23
commit 04f81a4
Showing
2 changed files
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Release | ||
on: | ||
push: | ||
tags: [v*] | ||
jobs: | ||
release: | ||
name: Release on GitHub and PGXN | ||
runs-on: ubuntu-latest | ||
container: pgxn/pgxn-tools | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
PGXN_USERNAME: ${{ secrets.PGXN_USERNAME }} | ||
PGXN_PASSWORD: ${{ secrets.PGXN_PASSWORD }} | ||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v4 | ||
- name: Install required packages | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y libpq-dev | ||
- name: Bundle the Release | ||
id: bundle | ||
run: pgxn-bundle | ||
- name: Release on PGXN | ||
run: pgxn-release | ||
- name: Generate Release Changes | ||
run: make latest-changes.md | ||
- name: Create GitHub Release | ||
id: release | ||
uses: actions/create-release@v1 | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: Release ${{ github.ref }} | ||
body_path: latest-changes.md | ||
- name: Upload Release Asset | ||
uses: actions/upload-release-asset@v1 | ||
with: | ||
upload_url: ${{ steps.release.outputs.upload_url }} | ||
asset_path: ./${{ steps.bundle.outputs.bundle }} | ||
asset_name: ${{ steps.bundle.outputs.bundle }} | ||
asset_content_type: application/zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters