-
Notifications
You must be signed in to change notification settings - Fork 13
Add release workflow #80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
8c6dd02
Rename cleanup cache job
bonnefoa e34ed87
Transfer release file using dummy container
bonnefoa ee5f3c6
Add .dockerignore
bonnefoa 5dcb437
Only fetch ext_version if it's not provided
bonnefoa 2fde421
Remove PG18 for now
bonnefoa eda8a67
Pin gh action sha1
bonnefoa 9e9c196
Add release workflow
bonnefoa File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,2 @@ | ||
| *.o | ||
| *.bc |
This file contains hidden or 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 |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| name: cleanup caches by a branch | ||
| name: Cleanup branch caches | ||
|
|
||
| permissions: {} | ||
|
|
||
|
|
||
This file contains hidden or 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
This file contains hidden or 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,73 @@ | ||
| # Publish pg_tracing (Ubuntu) | ||
| # Build and publish the pg_tracing extension as .deb to GitHub Releases. | ||
|
|
||
| name: Publish pg_tracing (Ubuntu) | ||
|
|
||
| permissions: | ||
| id-token: write | ||
| attestations: write | ||
| contents: write | ||
|
|
||
| on: | ||
| push: | ||
| tags: | ||
| - "v*" | ||
| workflow_dispatch: | ||
| inputs: | ||
| ext_version: | ||
| description: "The version to set for the pg_tracing release. This publishes the latest commit of the chosen branch and uploads it to the pre-existing GitHub Release of the provided version." | ||
| required: true | ||
| default: "" | ||
|
|
||
| jobs: | ||
| publish-pg_tracing: | ||
| name: Publish pg_tracing for PostgreSQL ${{ matrix.pg_version }} (${{ matrix.arch }}) | ||
| runs-on: ${{ matrix.runner }} | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| pg_version: [14, 15, 16, 17] | ||
| runner: [ubuntu-22.04, ubuntu-22.04-arm] | ||
| include: | ||
| - name: Ubuntu amd64 (Jammy) | ||
| runner: ubuntu-22.04 | ||
| arch: amd64 | ||
| - name: Ubuntu arm (Jammy) | ||
| runner: ubuntu-22.04-arm | ||
| arch: arm64 | ||
|
|
||
| steps: | ||
| - name: Checkout Git Repository | ||
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2 | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Retrieve Tag Version | ||
| id: retrieve_version | ||
| run: | | ||
| if [ -n "${{ github.event.inputs.ext_version }}" ]; then | ||
| EXT_VERSION=${{ github.event.inputs.ext_version }} | ||
| else | ||
| if [[ $GITHUB_REF == refs/tags/v* ]]; then | ||
| EXT_VERSION=${GITHUB_REF#refs/tags/v} | ||
| else | ||
| EXT_VERSION="0.0.0" | ||
| fi | ||
| fi | ||
| echo "ext_version=$EXT_VERSION" >> $GITHUB_OUTPUT | ||
|
|
||
| - name: Create deb Package | ||
| run: ARCH=${{ matrix.arch }} EXT_VERSION=${{ steps.retrieve_version.outputs.ext_version }} PG_VERSION=${{ matrix.pg_version }} make packages | ||
|
|
||
| - name: Sign and Attest Build Provenance | ||
| uses: actions/attest-build-provenance@c074443f1aee8d4aeeae555aebba3282517141b2 # v.2.2.3 | ||
| with: | ||
| subject-path: | | ||
| ./tmp/postgresql-${{ matrix.pg_version }}-pg-tracing_${{ steps.retrieve_version.outputs.ext_version }}_${{ matrix.arch }}.deb | ||
|
|
||
| - name: Release | ||
| uses: softprops/action-gh-release@c95fe1489396fe8a9eb87c0abf8aa5b2ef267fda # v 2.2.1 | ||
| if: startsWith(github.ref, 'refs/tags/') | ||
| with: | ||
| files: | | ||
| ./tmp/postgresql-${{ matrix.pg_version }}-pg-tracing_${{ steps.retrieve_version.outputs.ext_version }}_${{ matrix.arch }}.deb | ||
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.