sbt/.github/workflows/nightly.yml

64 lines
2.2 KiB
YAML

name: Nightly
on:
schedule:
# 08:00 UTC = 03:00 EST
- cron: '0 8 * * *'
jobs:
deploy:
strategy:
matrix:
include:
- os: ubuntu-latest
java: 8
runs-on: ${{ matrix.os }}
env:
JAVA_OPTS: -Xms800M -Xmx800M -Xss6M -XX:ReservedCodeCacheSize=128M -server -Dsbt.io.virtual=false -Dfile.encoding=UTF-8
steps:
- name: Checkout sbt/sbt
uses: actions/checkout@v2
- name: Checkout sbt/io
uses: actions/checkout@v2
with:
repository: sbt/io
ref: develop
path: io
- name: Checkout sbt/librarymanagement
uses: actions/checkout@v2
with:
repository: sbt/librarymanagement
ref: develop
path: librarymanagement
- name: Checkout sbt/zinc
uses: actions/checkout@v2
with:
repository: sbt/zinc
ref: develop
path: zinc
- name: Setup
uses: olafurpg/setup-scala@v13
with:
java-version: "adopt@1.${{ matrix.java }}"
- name: Coursier cache
uses: coursier/cache-action@v6
- name: Build and deploy
run: |
# build from fresh IO, LM, and Zinc
TIMESTAMP=$(TZ=UTC date +%Y%m%dT%H%M%S)
export BUILD_VERSION="1.5.0-bin-${TIMESTAMP}"
cd io
sbt -v +publish
cd ../
sbt -Dsbtlm.path=$HOME/work/sbt/sbt/librarymanagement -Dsbtzinc.path=$HOME/work/sbt/sbt/zinc -Dsbt.build.fatal=false "+lowerUtils/publish; {librarymanagement}/publish; {zinc}/publish; upperModules/publish; bundledLauncherProj/publish"
rm -rf "$HOME/.ivy2/local" || true
rm -r $(find $HOME/.sbt/boot -name "*-SNAPSHOT") || true
find $HOME/Library/Caches/Coursier/v1 -name "ivydata-*.properties" -delete || true
find $HOME/.ivy2/cache -name "ivydata-*.properties" -delete || true
find $HOME/.cache/coursier/v1 -name "ivydata-*.properties" -delete || true
find $HOME/.sbt -name "*.lock" -delete || true
env:
BINTRAY_USER: ${{ secrets.BINTRAY_USER }}
BINTRAY_PASS: ${{ secrets.BINTRAY_PASS }}
BINTRAY_REPOSITORY: maven-snapshots
BINTRAY_PACKAGE: sbt