Skip to content

Release v0.6.0

Release v0.6.0 #86

Workflow file for this run

name: Release
on:
push:
branches:
- main
tags:
- v*
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Set up JDK
uses: actions/setup-java@6a0805fcefea3d4657a47ac4c165951e33482018 # v4.2.2
with:
java-version: 17
distribution: adopt
- name: Set up gradle
uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0
# TODO: Run instrumental tests
- name: Build sample app
run: ./gradlew assembleDebug
# Release for commits with tags
- name: Get tag name
if: startsWith(github.ref, 'refs/tags/') && github.repository == 'dewantawsif/flexible-hilt'
run: |
set -x
echo "VERSION_TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
- name: Publish release
if: startsWith(github.ref, 'refs/tags/') && github.repository == 'dewantawsif/flexible-hilt'
run: ./gradlew publishAllPublicationsToMavenCentralRepository --no-configuration-cache -P version=${RELEASE_TAG:1}
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.OSSRH_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.OSSRH_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.SIGNING_KEY_ID }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNING_KEY }}
RELEASE_TAG: ${{ env.VERSION_TAG }}