Merge pull request #48 from smartystreets/xan/fix-retry-url #79
Workflow file for this run
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
name: Publish Java | |
on: | |
push: | |
tags: | |
- '*' | |
- '!**-dev**' | |
jobs: | |
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: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Setup Java | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '19' | |
distribution: 'adopt' | |
server-id: ossrh | |
server-username: OSSRH_USERNAME | |
server-password: OSSRH_PASSWORD | |
gpg-private-key: ${{env.GPG_SECRET_KEY}} | |
gpg-passphrase: GPG_PASSPHRASE | |
- name: Publish | |
run : | | |
echo -e "${{ secrets.OSSRH_GPG_SECRET_KEY }}" | gpg --batch --import | |
VERSION="${GITHUB_REF#refs/*/}" make publish | |
env: | |
GPG_SECRET_KEY: ${{ secrets.OSSRH_GPG_SECRET_KEY }} | |
GPG_PASSPHRASE: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSPHRASE }} | |
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} | |
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} |