Skip to content

update archetype.

update archetype. #72

Workflow file for this run

name: ci
on: [push]
jobs:
build:
if: "!contains(github.event.head_commit.message, 'skip ci')"
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
python-version: [3.6]
env:
DOCKER_IMAGE: "aemdesign/centos-java-buildpack"
SONAR_ORGANISATION: "aemdesign-github"
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_URL: "https://sonarcloud.io"
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_USERNAME: "aemdesign"
GITHUB_USER: aemdesign
TRAVIS_TOKEN: ${{ secrets.TRAVIS_TOKEN }}
GITHUB_EMAIL: ${{ secrets.GITHUB_EMAIL }}
GITHUB_USERNAME: ${{ secrets.GITHUB_USERNAME }}
GITHUB_TOKEN_ADMIN: ${{ secrets.GITHUB_TOKEN_ADMIN }}
AEM_NAME: ${{ secrets.AEM_NAME }}
AEM_KEY: ${{ secrets.AEM_KEY }}
GPG_SECRET_KEYS: ${{ secrets.GPG_SECRET_KEYS }}
GPG_OWNERTRUST: ${{ secrets.GPG_OWNERTRUST }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
GPG_EXECUTABLE: gpg
GPG_PRESET_EXECUTABLE: /usr/lib/gnupg/gpg-preset-passphrase
GPG_PUBID: "50A036956AAC64C13EF47B10D1E96A30ECFC7DFF"
GPG_PUBID_KEYGRIP: "020E615868703482DC2CD110B98D2702B6ABF89C"
steps:
- uses: actions/checkout@v2
with:
submodules: true
lfs: true
ref: ${{ github.head_ref }}
fetch-depth: 0
- uses: actions/setup-node@v1
with:
node-version: '10.x'
registry-url: https://npm.pkg.github.com/
scope: "@aem-design"
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN_ADMIN }}
- name: set up python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: get release notes
run: |
source <(curl -sL https://github.com/aem-design/aemdesign-docker/releases/latest/download/github_get_version.sh)
echo "===START==="
echo $GIT_RELEASE_NOTES
echo "====END===="
echo CURRENT_VERSION=$CURRENT_VERSION
- name: set eval variables
run: |
echo "DOCKER_COMMAND=docker run --user $(id -u):$(id -g) -v ${GITHUB_WORKSPACE}:/build ${DOCKER_IMAGE}" >> $GITHUB_ENV
$DOCKER_COMMAND java -version
$DOCKER_COMMAND node -v
git config --global user.email "${GITHUB_EMAIL}"
git config --global user.name "${GITHUB_USERNAME}"
- name: setup gpg
run: |
source <(curl -sL https://github.com/aem-design/aemdesign-docker/releases/latest/download/setup-gpg.sh)
- name: docker - mvn package
run: $DOCKER_COMMAND mvn clean package -DskipTests=true -Dgpg.skip -B -Dmaven.repo.local=./build/.m2/repository
- name: docker - mvn integration test
run: $DOCKER_COMMAND bash -c "mvn integration-test -B -Dmaven.repo.local=./build/.m2/repository && cd target/test-classes/projects/basic/project/projectx && chmod +x package && ./package"
- name: deploy to maven cental
if: github.ref == 'refs/heads/master'
run: $DOCKER_COMMAND echo $GPG_SECRET_KEYS | base64 --decode | $GPG_EXECUTABLE --import && echo $GPG_OWNERTRUST | base64 --decode | $GPG_EXECUTABLE --import-ownertrust && mvn deploy --settings default.xml -B -P release
- name: get artifact name
run: |
ARTIFACT_PATHNAME=$(ls target/*.jar | head -n 1)
ARTIFACT_NAME=$(basename $ARTIFACT_PATHNAME)
echo "ARTIFACT_NAME=${ARTIFACT_NAME}" >> $GITHUB_ENV
echo "ARTIFACT_PATHNAME=${ARTIFACT_PATHNAME}" >> $GITHUB_ENV
- name: create release ${{ env.ARTIFACT_NAME }}
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.GITHUB_TAG }}
release_name: ${{ env.GITHUB_TAG }}
body: ${{ env.GIT_RELEASE_NOTES }}
draft: false
prerelease: false
- name: upload release asset ${{ env.ARTIFACT_NAME }}
id: upload-release-asset
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ env.ARTIFACT_PATHNAME }}
asset_name: ${{ env.ARTIFACT_NAME }}
asset_content_type: application/java-archive