Skip to content

Release

Release #11

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*.*.*'
jobs:
publish-release:
runs-on: ubuntu-latest
if: github.repository == 'square/anvil'
timeout-minutes: 25
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- uses: gradle/actions/wrapper-validation@d9c87d481d55275bb5441eef3fe0e46805f9ef70 # v3
- uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4
with:
distribution: 'zulu'
java-version: '17'
check-latest: true
- name: Publish Release 1.9
run: ./gradlew clean publish --no-build-cache --no-daemon --stacktrace --no-parallel
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.ARTIFACT_SIGNING_PRIVATE_KEY }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ''
- name: Extract release notes
id: release_notes
uses: ffurrer2/extract-release-notes@9989ccec43d726ef05aa1cd7b2854fb96b6df6ab # v2
- name: Check if prerelease
id: prerelease
run: |
version=$(grep VERSION_NAME gradle.properties | cut -d'=' -f2)
if [[ $version == *"-beta"* ]]; then
echo "isPrerelease=true" >> $GITHUB_OUTPUT
else
echo "isPrerelease=false" >> $GITHUB_OUTPUT
fi
- name: Create release
uses: softprops/action-gh-release@c062e08bd532815e2082a85e87e3ef29c3e6d191 # v2
with:
body: ${{ steps.release_notes.outputs.release_notes }}
prerelease: ${{ steps.prerelease.outputs.isPrerelease }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}