Skip to content

adding synergian/wagon-git pom info back in #43

adding synergian/wagon-git pom info back in

adding synergian/wagon-git pom info back in #43

Workflow file for this run

#
# MIT License
# Copyright (c) 2019 Montana State University Software Engineering Labs
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#
name: "Release"
on:
push:
branches: [ release, cicd-test ]
jobs:
build_and_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: cicd-test
# java/maven setup
- name: Set up JDK 11
uses: actions/[email protected]
with:
distribution: temurin
java-version: 11
# - name: Run Regression Tests
# run: |
# mvn --batch-mode -f msusel-pique/pom.xml clean test
publish_maven_artifact:
needs: build_and_test
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
with:
ref: cicd-test
# java/maven setup
- name: Set up JDK 11
uses: actions/[email protected]
with:
distribution: temurin
java-version: 11
- name: Set up ssh key authentication to maven repo
run: |
mkdir -p ~/.ssh
echo "${{ secrets.MSUSEL_CI_BOT_SSH_KEY }}" > ~/.ssh/msusel_ci_bot_key
chmod 600 ~/.ssh/msusel_ci_bot_key
ssh-keyscan github.com >> ~/.ssh/known_hosts
eval $(ssh-agent -s)
ssh-add ~/.ssh/msusel_ci_bot_key
- name: Create Maven settings.xml for SSH authentication
run: |
mkdir -p ~/.m2
cat > ~/.m2/settings.xml <<EOF
<settings>
<servers>
<server>
<id>msusel-maven-repo</id>
<username>git</username> <!-- Use "git" as the username for SSH-based authentication -->
<privateKey>~/.ssh/msusel_ci_bot_key</privateKey>
</server>
</servers>
</settings>
EOF
- name: configure git in runner environment
run: |
git config --global user.name "${{ secrets.CI_BOT_USERNAME }}"
git config --global user.email "${{ secrets.CI_BOT_EMAIL }}"
git config --global init.defaultBranch master
- name: deploy to MSUSEL maven repository
run: |
mvn --batch-mode -f pom.xml clean deploy -X -Dmaven.test.skip=true
# deploy_to_dockerhub:
# needs: build_and_test
# uses: MSUSEL/msusel-pique/.github/workflows/docker-build-push.yml@cicd-test
# secrets: inherit
# with:
# tag-name: msusel/pique-core:cicd-test