Skip to content

Switch to abbreviated license headers #205

Switch to abbreviated license headers

Switch to abbreviated license headers #205

name: "Blaze-Persistence Publish Snapshot"
on:
push:
branches:
- 'main'
env:
MAVEN_SKIP_RC: true
jobs:
snapshot:
name: Publish Snapshot
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Update /etc/hosts file
# /etc/hosts file needs to be updated as a workaround for
# https://github.com/actions/virtual-environments/issues/3185
run: echo -e "$(ip addr show eth0 | grep "inet\b" | awk '{print $2}' | cut -d/ -f1)\t$(hostname -f) $(hostname -s)" | sudo tee -a /etc/hosts
- name: Set up Java 8
uses: AdoptOpenJDK/install-jdk@v1
with:
version: 8
targets: JDK8_HOME;JAVA_HOME
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 17
distribution: 'temurin'
- name: Get year/month for cache key
id: get-date
run: |
echo "::set-output name=yearmonth::$(/bin/date -u "+%Y-%m")"
shell: bash
- name: Cache Maven local repository
uses: actions/cache@v2
id: cache-maven
with:
path: |
~/.m2/repository
# refresh cache every month to avoid unlimited growth
key: maven-localrepo-${{ steps.get-date.outputs.yearmonth }}
- name: Set up Maven
run: ./mvnw -v
- name: Run build script
env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
run: ./ci/deploy-snapshot.sh
shell: bash