CI: move from Travis to Github Actions #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 'CI Publish to Maven Central' | |
on: | |
workflow_dispatch: | |
push: | |
tags: | |
- 'release/*' | |
concurrency: | |
group: '${{ github.workflow }} @ ${{ github.head_ref || github.ref }}' | |
cancel-in-progress: false | |
jobs: | |
compile-test-and-publish-to-maven-central: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: vfs-azure | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Java and Maven | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '8' | |
cache: 'maven' | |
cache-dependency-path: 'vfs-azure/pom.xml' | |
- name: Compile | |
run: mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B -V | |
- name: Run tests | |
run: mvn test -B | |
env: | |
AZURE_ACCOUNT_NAME: ${{ vars.AZURE_ACCOUNT_NAME }} | |
AZURE_ACCOUNT_KEY: ${{ secrets.AZURE_ACCOUNT_KEY }} | |
AZURE_TEST0001_CONTAINER_NAME: ${{ vars.AZURE_TEST0001_CONTAINER_NAME }} | |
- name: Copy publishing-config settings.xml into place | |
run: cp .ci.settings.xml $HOME/.m2/settings.xml | |
- name: Publish to Maven Central | |
run: ./publish.sh | |
env: | |
AZURE_ACCOUNT_NAME: ${{ vars.AZURE_ACCOUNT_NAME }} | |
AZURE_ACCOUNT_KEY: ${{ secrets.AZURE_ACCOUNT_KEY }} | |
AZURE_TEST0001_CONTAINER_NAME: ${{ vars.AZURE_TEST0001_CONTAINER_NAME }} | |
SONATYPE_GPGKEY_FILE_ENCRYPTION_KEY: ${{ secrets.SONATYPE_GPGKEY_FILE_ENCRYPTION_KEY }} | |
SONATYPE_GPGKEY_FILE_ENCRYPTION_IV: ${{ secrets.SONATYPE_GPGKEY_FILE_ENCRYPTION_IV }} | |
SONATYPE_GPGKEY_PASSPHRASE: ${{ secrets.SONATYPE_GPGKEY_PASSPHRASE }} | |
SONATYPE_USERNAME: ${{ vars.SONATYPE_USERNAME }} | |
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} |