Skip to content

Commit f9d067e

Browse files
authored
chore: Release Process Automation (#53)
Summary Release Process Automation Description Automates the release process using GitHub Actions & changes to CHANGELOG.md. For Signing: GPG Private key stored in GitHub Actions, GPG_PRIVATE_KEY Private Key Passphrase stored in GitHub Actions, GPG_PASSPHRASE When a tag is created, this workflow will run - Builds Driver - Sign Jars with GPG - Parse the top version of CHANGES for body of release - Publish & Release as a draft
1 parent 7d81b5a commit f9d067e

File tree

2 files changed

+67
-4
lines changed

2 files changed

+67
-4
lines changed

.github/workflows/release.yml

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: 'Release Driver'
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
permissions:
9+
actions: write
10+
contents: write
11+
deployments: write
12+
packages: write
13+
pull-requests: write
14+
repository-projects: write
15+
16+
jobs:
17+
ubuntu-latest-build-and-release:
18+
name: 'Build and Release Driver'
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: 'Clone Repository'
22+
uses: actions/checkout@v2
23+
with:
24+
fetch-depth: 50
25+
- name: 'Build Driver'
26+
uses: burrunan/gradle-cache-action@v1
27+
env:
28+
S3_BUILD_CACHE_ACCESS_KEY_ID: ${{ secrets.S3_BUILD_CACHE_ACCESS_KEY_ID }}
29+
S3_BUILD_CACHE_SECRET_KEY: ${{ secrets.S3_BUILD_CACHE_SECRET_KEY }}
30+
with:
31+
job-id: jdk8
32+
arguments: --no-parallel --no-daemon jandex -x test build
33+
- name: 'Set Version Env Variable'
34+
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
35+
- name: 'Get Release Details'
36+
run: |
37+
export RELEASE_DETAILS="$(awk -vN=2 'n<N;/^## /{++n}' CHANGELOG.md)"
38+
export RELEASE_DETAILS="$(sed '${/^# /d;}' <<< "$RELEASE_DETAILS")"
39+
export RELEASE_DETAILS="$(sed '$d' <<< "$RELEASE_DETAILS")"
40+
touch RELEASE_DETAILS.md
41+
echo "$RELEASE_DETAILS" > RELEASE_DETAILS.md
42+
- name: 'Install GPG Secret Key'
43+
id: import_gpg
44+
uses: crazy-max/ghaction-import-gpg@v4
45+
with:
46+
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
47+
passphrase: ${{ secrets.GPG_PASSPHRASE }}
48+
- name: 'Sign Jars'
49+
run: |
50+
export GPG_TTY=$(tty)
51+
for jar in pgjdbc/build/libs/*.jar; do gpg --detach-sign --armor $jar; done
52+
for signed in pgjdbc/build/libs/*.asc; do gpg --verify $signed; done
53+
- name: 'Upload to Release'
54+
uses: ncipollo/release-action@v1
55+
with:
56+
draft: true
57+
name: "AWS JDBC Driver for PostgreSQL Public Preview - v${{ env.RELEASE_VERSION }}"
58+
bodyFile: RELEASE_DETAILS.md
59+
artifacts: pgjdbc/build/libs/*
60+
token: ${{ secrets.GITHUB_TOKEN }}

CHANGELOG.md

+7-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
# Changelog
22

3-
Version 0.1.0 (Public Preview)
3+
## Version 0.1.1 (Public Preview) - 2021-09-29
4+
### Added
5+
* AWS IAM Authentication method
46

5-
- Based on the PostgreSQL JDBC 42.2.19 community driver.
6-
7-
- The driver is cluster aware for Amazon Aurora PostgreSQL. It takes advantage of Amazon Aurora’s fast failover capabilities, reducing failover times from minutes to seconds.
7+
## [Version 0.1.0 (Public Preview)](https://github.com/awslabs/aws-postgresql-jdbc/releases/tag/0.1.0) - 2021-04-26
8+
Based on the PostgreSQL JDBC 42.2.19 community driver.
9+
### Features
10+
* The driver is cluster aware for Amazon Aurora PostgreSQL. It takes advantage of Amazon Aurora’s fast failover capabilities, reducing failover times from minutes to seconds.

0 commit comments

Comments
 (0)