name: Publish

on:
  release:
    types: [created]

jobs:
  publish:
    runs-on: ubuntu-latest

    env:
      MAILOSAUR_BASE_URL: https://mailosaur.com/
      MAILOSAUR_SMTP_HOST: mailosaur.io
      MAILOSAUR_SMTP_PORT: 2525
      MAILOSAUR_API_KEY: ${{ secrets.MAILOSAUR_API_KEY }}
      MAILOSAUR_SERVER: ${{ secrets.MAILOSAUR_SERVER }}

    steps:
      - uses: actions/checkout@v2
      - name: Set up Java
        uses: actions/setup-java@v1
        with:
          java-version: 1.8
          server-id: ossrh
          server-username: MAVEN_USERNAME
          server-password: MAVEN_PASSWORD
      - name: Version
        run: |
          version=`git describe --abbrev=0 --tags` &&	
          mvn versions:set -DnewVersion=$version
      - name: Publish
        run: mvn -B deploy
        env:
          MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
          MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}

name: Publish

on:
  release:
    types: [created]

jobs:
  publish:
    runs-on: ubuntu-latest

    env:
      MAILOSAUR_BASE_URL: https://mailosaur.com/
      MAILOSAUR_SMTP_HOST: mailosaur.io
      MAILOSAUR_SMTP_PORT: 2525
      MAILOSAUR_API_KEY: ${{ secrets.MAILOSAUR_API_KEY }}
      MAILOSAUR_SERVER: ${{ secrets.MAILOSAUR_SERVER }}

    steps:
      - uses: actions/checkout@v2
      - name: Set up Java
        uses: actions/setup-java@v1
        with:
          java-version: 1.8
          server-id: ossrh
          server-username: MAVEN_USERNAME
          server-password: MAVEN_PASSWORD
      - name: Version
        run: |
          version=`git describe --abbrev=0 --tags` &&	
          sed -i s/\[0-9]\.\[0-9]\.\[0-9]/$version/ src/main/java/com/mailosaur/MailosaurClient.java && 
          mvn versions:set -DnewVersion=$version
      - name: Publish
        run: mvn -B deploy
        env:
          MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
          MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}

Update client version reference during build
Update client version reference during build
