https://github.com/usethesource/releases-maven-action
custom action to handle deployment of use the source releases
https://github.com/usethesource/releases-maven-action
Last synced: 3 months ago
JSON representation
custom action to handle deployment of use the source releases
- Host: GitHub
- URL: https://github.com/usethesource/releases-maven-action
- Owner: usethesource
- Created: 2021-05-06T15:20:23.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2023-08-31T10:45:05.000Z (almost 3 years ago)
- Last Synced: 2025-02-07T11:14:58.721Z (over 1 year ago)
- Size: 32.2 KB
- Stars: 1
- Watchers: 6
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# UseTheSource's custom release Maven artifacts
A UseTheSource specific action that takes care of deploying to the UseTheSource release server ().
It takes care of performing the `mvn deploy` itself.
**Note: this won't work for SNAPSHOT releases**
## Using this action
Add the following section to your github deployment:
```yaml
- name: Deploy
if: startsWith(github.ref, 'refs/tags/v') # only tagged releases starting with a v will run this action
uses: usethesource/releases-maven-action@v1 # this will run mvn deploy -DskipTests for you
with:
maven-username: ${{ secrets.RELEASE_MAVEN_USERNAME }} # the secretes are defined for all repo's in the usethesource organisation
maven-password: ${{ secrets.RELEASE_MAVEN_PASSWORD }}
maven-local-port: ${{ secrets.RELEASE_MAVEN_LOCAL_PORT }}
ssh-hostname: ${{ secrets.RELEASE_SSH_SERVER }}
ssh-known-host: ${{ secrets.RELEASE_SSH_KNOWN_HOSTS }}
ssh-username: ${{ secrets.RELEASE_SSH_USERNAME }}
ssh-private-key: ${{ secrets.RELEASE_SSH_PRIVATE_KEY }}
maven-options: "-DoptionalFlags -DyouWantToPass"
working-directory: "./subdirectory"
```
Note that the if condition doesn't support regex. If you want to be more restrictive, you can add the following guards at the top of your action:
```yaml
on:
push:
branches:
- main
tags:
- 'v[0-9]+.*'
pull_request:
branches:
- main
```