Skip to content

Commit

Permalink
Merge pull request #40 from smartystreets/yml-update
Browse files Browse the repository at this point in the history
Added release job to the workflow that will run after maven publish
  • Loading branch information
RyanLCox1 committed Aug 4, 2023
2 parents 408e5ce + 173f696 commit bf7aad4
Showing 1 changed file with 30 additions and 4 deletions.
34 changes: 30 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,38 @@ on:
push:
tags:
- '*'
- '!**-dev**'

jobs:
publish:
release:
runs-on: ubuntu-latest
needs: publish
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set Version
id: set_version
run: |
echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
shell: bash

- name: Create Release
run: |
gh release create ${{ env.VERSION }} --title "Release ${{ env.VERSION }}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
- name: Checkout code
uses: actions/checkout@v3

- name: Setup Java
uses: actions/setup-java@v3
with:
java-version: '19'
distribution: 'adopt'
Expand All @@ -20,7 +44,9 @@ jobs:
server-password: OSSRH_PASSWORD
gpg-private-key: ${{env.GPG_SECRET_KEY}}
gpg-passphrase: GPG_PASSPHRASE
- run : |

- name: Publish
run : |
echo -e "${{ secrets.OSSRH_GPG_SECRET_KEY }}" | gpg --batch --import
VERSION="${GITHUB_REF#refs/*/}" make publish
env:
Expand Down

0 comments on commit bf7aad4

Please sign in to comment.