Skip to content

Release v4.9.0-B1

Release v4.9.0-B1 #68

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*'
concurrency: release
jobs:
release_notes:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get previous release tag
id: get_previous_release_tag
run: |
PREVIOUS_RELEASE_TAG=$(git tag --sort=-version:refname --merged | grep -E '^v([[:digit:]]+\.){2}[[:digit:]]+$' | grep -v "$(git describe --tags)" | head -1)
echo "previous_release_tag=$PREVIOUS_RELEASE_TAG" >> $GITHUB_OUTPUT
- name: Generate Release Notes
uses: enonic/release-tools/generate-changelog@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PREVIOS_RELEASE_TAG: ${{ steps.get_previous_release_tag.outputs.previous_release_tag }}
OUTPUT_FILE: changelog.md
- uses: actions/upload-artifact@v4
with:
name: changelog
path: changelog.md
build:
runs-on: ubuntu-latest
needs: release_notes
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 11
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Get publishing variables
id: publish_vars
uses: enonic/release-tools/publish-vars@master
env:
PROPERTIES_PATH: './gradle.properties'
JAVA_HOME: ''
- name: Verify release version
if: steps.publish_vars.outputs.release != 'true'
run: exit 1
- name: Publish
run: ./gradlew publish -PrepoKey=${{ steps.publish_vars.outputs.repo }} -PrepoUser=ci -PrepoPassword=${{ secrets.ARTIFACTORY_PASSWORD }}
- name: Download changelog
uses: actions/download-artifact@v4
with:
name: changelog
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.publish_vars.outputs.tag_name }}
body_path: changelog.md
release_name: Enonic Admin UI Lib ${{ steps.publish_vars.outputs.version }}
prerelease: ${{ steps.publish_vars.outputs.prerelease == 'true' }}