Defining basic structure.
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
new file mode 100644
index 0000000..e3021e1
--- /dev/null
+++ b/.github/workflows/release.yml
@@ -0,0 +1,56 @@
+name: Release google-java-format
+
+on:
+ workflow_dispatch:
+ inputs:
+ version:
+ description: "version number for this release."
+ required: true
+
+env:
+ JAVA_HOME: "$JAVA_HOME_17_X64"
+
+jobs:
+ define-release:
+ runs-on: ubuntu-latest
+ permissions:
+ contents: write
+ steps:
+ - name: Setup Signing Key
+ run: |
+ cat <(echo -e "${{ secrets.GPG_SIGNING_KEY }}") | gpg --batch --import
+ gpg --list-secret-keys --keyid-format LONG
+
+ - name: Checkout
+ uses: actions/checkout@2.4.0
+
+ - name: Set up JDK
+ uses: actions/setup-java@v2
+ with:
+ java-version: 17
+ distribution: 'zulu'
+ cache: 'maven'
+
+ - name: Run Tests
+ run: mvn verify
+
+ - name: Bump Version Number
+ env:
+ NEW_VERSION: ${{ github.events.input.version }}
+ run: |
+ mvn versions:set versions:commit -DnewVersion="${NEW_VERSION}"
+ git ls-files | grep 'pom.xml$' | xargs git add
+ git commit -m "Release google-java-format ${NEW_VERSION}"
+ git tag "v${NEW_VERSION}"
+ git push origin "v${NEW_VERSION}"
+
+ - name: Create Maven Jars
+ run: mvn clean deploy
+
+ - name: Define Release Entry
+ uses: softprops/action-gh-release@v1
+ with:
+ draft: true
+ name: ${{ github.events.input.version }}
+ tag_name: "v${{ github.events.input.version }}"
+