[maven-release-plugin] prepare release v0.0.1 #100
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Maven Release | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
ssh-key: ${{ secrets.SSH_PRIVATE_KEY }} | |
- name: Set up Git Author Identity | |
run: | | |
git config --global user.name "github-actions[bot]" | |
git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
- name: Persist SSH Configuration | |
run: | | |
mkdir -p ~/.ssh | |
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_ed25519 | |
chmod 600 ~/.ssh/id_ed25519 | |
echo "Host github.com" > ~/.ssh/config | |
echo " StrictHostKeyChecking no" >> ~/.ssh/config | |
echo " IdentityFile ~/.ssh/id_ed25519" >> ~/.ssh/config | |
eval "$(ssh-agent -s)" | |
ssh-add ~/.ssh/id_ed25519 | |
- name: Set up JDK | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '21' | |
- name: Cache Maven dependencies | |
uses: actions/cache@v3 | |
with: | |
path: ~/.m2 | |
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
restore-keys: | | |
${{ runner.os }}-maven | |
- name: Set Correct Remote URL | |
run: git remote set-url origin git@github.com:PabloSanchi/jchunk.git | |
- name: Run Maven Release | |
run: | | |
mvn release:prepare -B -e -X | |
mvn release:perform -B -e -X |