Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fulminazzo/java-automatic-release
Automatically build your Java Project and release all the related JARs.
https://github.com/fulminazzo/java-automatic-release
github-actions gradle java maven publishing
Last synced: 7 days ago
JSON representation
Automatically build your Java Project and release all the related JARs.
- Host: GitHub
- URL: https://github.com/fulminazzo/java-automatic-release
- Owner: Fulminazzo
- Created: 2023-12-24T20:23:54.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-07T10:56:13.000Z (about 1 month ago)
- Last Synced: 2024-12-07T11:23:22.556Z (about 1 month ago)
- Topics: github-actions, gradle, java, maven, publishing
- Language: Shell
- Homepage:
- Size: 10.7 KB
- Stars: 1
- Watchers: 0
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Automatic Release
Automatic Release is a _composite_ GitHub Action that joins together multiple actions to automate your project releases.**Starting from version v3, it is now REQUIRED to prepend `!release` before the commit message for any commit that you want released.**
It does so by:
- setting up Java to the specified version in `with.java-version`;
- find out what build tool you are using:
- if you are using **Maven**, it loads the project variables (_version_ and _modules_) from your `pom.xml` file and builds it using `mvn package`;
- if you are using **Gradle**, it loads the project variables from both your `build.gradle` and `settings.gradle` files and builds it using `./gradlew build`;
- if you are using **none of the above**, the action fails (**Apache Ant is NOT supported**).
- finally,
it uses the previous loaded variables to create a new release with tag
`$VERSION` and uses your `$COMMIT_MESSAGE` as the description.
Every file found during the compilation process will be published.To start using it, create a new workflow and insert the following:
```yaml
# Name of the action
name: Automatic Release# Event to run on
on:
# Will run on every push in the "main" or "master" branch
push:
branches:
- main
- masterpermissions:
contents: write# Jobs that will execute
jobs:
release:
name: Setup Environment, Build JAR and Release Project
runs-on: ubuntu-latest
if: "startsWith(github.event.head_commit.message, '!release')"
steps:
- name: Automatic Release
uses: Fulminazzo/java-automatic-release@v3
with:
java-version: 8
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPOSITORY_NAME: ${{ github.event.repository.name }}
# Message specified in the commit
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
```