Skip to content

Merge pull request #9 from fortify/auto-doc-updates #17

Merge pull request #9 from fortify/auto-doc-updates

Merge pull request #9 from fortify/auto-doc-updates #17

on:
push:
branches:
- main
env:
DIST_DIR: ${{ github.workspace }}/build/dist
name: Build production release
jobs:
build-and-release:
runs-on: ubuntu-latest
steps:
- name: Check-out source code
uses: actions/checkout@v2
- name: Generate and process release PR
id: release_please
uses: GoogleCloudPlatform/release-please-action@v2
with:
release-type: simple
package-name: ${{ github.event.repository.name }}
- name: Define production release info
if: steps.release_please.outputs.release_created
run: |
tag=${{steps.release_please.outputs.tag_name}}
version=${{steps.release_please.outputs.version}}
major=${{steps.release_please.outputs.major}}
minor=${{steps.release_please.outputs.minor}}
patch=${{steps.release_please.outputs.patch}}
echo DO_RELEASE=true >> $GITHUB_ENV
echo RELEASE_TAG=${tag} >> $GITHUB_ENV
echo RELEASE_VERSION=${version} >> $GITHUB_ENV
- name: Build production release
if: env.DO_RELEASE
run: ./gradlew dist distThirdParty -Pversion=${{env.RELEASE_VERSION}}
- name: Upload assets to release
if: env.DO_RELEASE
run: |
tag=${{ steps.release_please.outputs.tag_name }}
files=$(find "${{ env.DIST_DIR }}" -type f -printf "%p ")
gh release upload "${tag}" $files --clobber
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}