Skip to content

clean up for adding onComplete and buildContext (#695) #411

clean up for adding onComplete and buildContext (#695)

clean up for adding onComplete and buildContext (#695) #411

Workflow file for this run

name: Master Build and Publish
# For master push: Builds and publishes the development version to maven central
on:
push:
branches:
- master
workflow_dispatch:
jobs:
buildAndPublish:
runs-on: ubuntu-latest
permissions:
checks: write
contents: write
id-token: write
env:
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
RELEASE_VERSION: 0.${{ github.run_id }}
steps:
- uses: actions/checkout@v1
- name: Set up Java 11
uses: actions/setup-java@v1
with:
java-version: '11.0.9'
# Populates ARTIFACTORY_USERNAME and ARTIFACTORY_API_KEY with
# temporary username/password for publishing to packages.atlassian.com
- name: Get publish token
id: publish-token
uses: atlassian-labs/artifact-publish-token@v1.0.1
with:
output-modes: environment
- name: Build and Test
run: ./gradlew assemble && ./gradlew check --info
- name: Publish
run: ./gradlew artifactoryPublish -x check --info
- uses: actions/checkout@v4
- name: Tag commit with release
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git tag -a "${RELEASE_VERSION}" -m "Tag release ${RELEASE_VERSION}"
git push origin ${RELEASE_VERSION}
- uses: actions/upload-artifact@v4
with:
name: my-artifact
path: lib/build
retention-days: 1
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v2.18.0
if: always()
with:
files: '**/build/test-results/test/TEST-*.xml'
- name: debug files
run: find ./ -type f -name "*.jar" -ls