Skip to content

Deploy Release

Deploy Release #3

# This file will result in a new townyresources release version being deployed.
name: Deploy Release
on:
workflow_dispatch:
env:
CURR_VER: 0.0.0
jobs:
deploy_release_as_draft:
runs-on: ubuntu-latest
strategy:
matrix:
java: ['17']
name: Creating CommentedConfiguration Release
steps:
- name: checkout repo content
uses: actions/checkout@v3 # checkout the repository content to github runner.
- name: set up eclipse temurin
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
java-package: jdk
cache: 'maven'
- name: compile commentedconfiguration with maven
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: mvn -B clean package
- name: find current version
run: |
export POM_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
echo "CURR_VER=$POM_VERSION" >> $GITHUB_ENV
- name: create release
uses: softprops/action-gh-release@v1
with:
generate_release_notes: true
append_body: false
draft: false
prerelease: false
token: ${{ github.token }}
tag_name: ${{ env.CURR_VER }}
name: ${{ env.CURR_VER }}
files: |
./target/CommentedConfiguration-${{ env.CURR_VER }}.jar
env:
GITHUB_REPOSITORY: my_gh_org/my_gh_repo
- name: prepare maven settings.xml
uses: s4u/maven-settings-action@v2.8.0
with:
githubServer: false
servers: |
[{
"id": "nexus",
"username": "${{ secrets.GLAREREPO_USERNAME }}",
"password": "${{ secrets.GLAREREPO_PASSWORD }}"
}]
- name: deploy to glaremaster repo
run: mvn deploy