Skip to content

Using personal access token as a temporary measure #25

Using personal access token as a temporary measure

Using personal access token as a temporary measure #25

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: deploy to MSUSEL maven repository
run: |
# git config --global user.name "${{ github.actor }}"
# git config --global user.email "${{ github.actor }}@users.noreply.github.com"
git config --global user.name "SECL Developers"
# FIX ME!!! need to migrate to github packages so authentication can be
# performed at the org level.
git config --global user.email "[email protected]"
mvn --batch-mode -f pom.xml clean deploy -Dmaven.test.skip=true
env:
GITHUB_TOKEN: ${{secrets.PAT}}
# 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