Fix Github actions #8
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: "Blaze-Actor Publish Snapshot" | |
on: | |
push: | |
branches: | |
- 'master' | |
env: | |
MAVEN_SKIP_RC: true | |
jobs: | |
snapshot: | |
name: Publish Snapshot | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Java 8 | |
uses: AdoptOpenJDK/install-jdk@v1 | |
with: | |
version: 8 | |
targets: JDK8_HOME;JAVA_HOME | |
- name: Download JDK 14 | |
uses: sormuras/[email protected] | |
id: jdk | |
with: | |
feature: 14 | |
- name: Set up JDK 14 | |
uses: actions/[email protected] | |
with: | |
java-version: ${{ steps.jdk.outputs.version }} | |
jdkFile: ${{ steps.jdk.outputs.file }} | |
- 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 |