Skip to content

Commit

Permalink
Create release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
dinkar-jain authored Dec 29, 2023
1 parent 2ca7fdf commit 7a75faa
Showing 1 changed file with 84 additions and 0 deletions.
84 changes: 84 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
name: Release on manual push

on:
workflow_dispatch:
inputs:
release_version:
description: 'Release version'
required: true

jobs:
release:
name: "Release"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set version
run: |
sed -i "s/1.SNAPSHOT/${{ inputs.release_version }}/g" build.gradle.kts src/main/kotlin/id/walt/Values.kt
- run: |
git tag v${{ inputs.release_version }}
git push --tags
- name: Setup cache
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Gradle wrapper validation
uses: gradle/wrapper-validation-action@v1
- name: Running gradle build
uses: eskatos/[email protected]
env:
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
with:
arguments: build publish --no-daemon
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push Docker images
uses: docker/[email protected]
with:
push: true
tags: waltid/xyzkit:latest, waltid/xyzkit:${{ inputs.release_version }}
- name: Changelog
uses: ardalanamini/auto-changelog@v3
id: changelog
with:
github-token: ${{ github.token }}
commit-types: |
breaking: Breaking Changes
feat: New Features
fix: Bug Fixes
revert: Reverts
perf: Performance Improvements
refactor: Refactors
deps: Dependencies
docs: Documentation Changes
style: Code Style Changes
build: Build System
ci: Continuous Integration
test: Tests
chore: Chores
other: Other Changes
default-commit-type: Other Changes
release-name: v${{ inputs.release_version }}
mention-authors: true
mention-new-contributors: true
include-compare: true
semver: true
- name: Create Release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ inputs.release_version }}
body: |
${{ steps.changelog.outputs.changelog }}
prerelease: ${{ steps.changelog.outputs.prerelease }}

0 comments on commit 7a75faa

Please sign in to comment.