Skip to content

Commit 8ce959e

Browse files
Merge pull request #8496 from dotty-staging/gh-actions-nightlies
Use GitHub Actions to release nightly builds
2 parents 800251d + c30443c commit 8ce959e

File tree

2 files changed

+143
-52
lines changed

2 files changed

+143
-52
lines changed

.drone.yml

Lines changed: 47 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -91,53 +91,53 @@ steps:
9191
- tag
9292
- promote
9393

94-
- name: publish_nightly
95-
pull: default
96-
image: lampepfl/dotty:2020-01-22-2
97-
depends_on:
98-
- test
99-
- test_bootstrapped
100-
- community_build
101-
- test_sbt
102-
- test_java11
103-
commands:
104-
- ./project/scripts/sbtPublish ";project dotty-bootstrapped ;publishSigned ;sonatypeBundleRelease"
105-
environment:
106-
NIGHTLYBUILD: yes
107-
PGP_PW:
108-
from_secret: pgp_pw
109-
PGP_SECRET:
110-
from_secret: pgp_secret
111-
SONATYPE_PW:
112-
from_secret: sonatype_pw
113-
SONATYPE_USER:
114-
from_secret: sonatype_user
115-
when:
116-
event:
117-
- promote
118-
target:
119-
- nightly
120-
121-
- name: nightly_documentation
122-
pull: default
123-
image: lampepfl/dotty:2020-01-22-2
124-
depends_on:
125-
- test
126-
- test_bootstrapped
127-
- community_build
128-
- test_java11
129-
- publish_nightly
130-
commands:
131-
- ./project/scripts/genDocs -doc-snapshot
132-
environment:
133-
BOT_TOKEN:
134-
from_secret: bot_token
135-
NIGHTLYBUILD: yes
136-
when:
137-
event:
138-
- promote
139-
target:
140-
- nightly
94+
# - name: publish_nightly
95+
# pull: default
96+
# image: lampepfl/dotty:2020-01-22-2
97+
# depends_on:
98+
# - test
99+
# - test_bootstrapped
100+
# - community_build
101+
# - test_sbt
102+
# - test_java11
103+
# commands:
104+
# - ./project/scripts/sbtPublish ";project dotty-bootstrapped ;publishSigned ;sonatypeBundleRelease"
105+
# environment:
106+
# NIGHTLYBUILD: yes
107+
# PGP_PW:
108+
# from_secret: pgp_pw
109+
# PGP_SECRET:
110+
# from_secret: pgp_secret
111+
# SONATYPE_PW:
112+
# from_secret: sonatype_pw
113+
# SONATYPE_USER:
114+
# from_secret: sonatype_user
115+
# when:
116+
# event:
117+
# - promote
118+
# target:
119+
# - nightly
120+
121+
# - name: nightly_documentation
122+
# pull: default
123+
# image: lampepfl/dotty:2020-01-22-2
124+
# depends_on:
125+
# - test
126+
# - test_bootstrapped
127+
# - community_build
128+
# - test_java11
129+
# - publish_nightly
130+
# commands:
131+
# - ./project/scripts/genDocs -doc-snapshot
132+
# environment:
133+
# BOT_TOKEN:
134+
# from_secret: bot_token
135+
# NIGHTLYBUILD: yes
136+
# when:
137+
# event:
138+
# - promote
139+
# target:
140+
# - nightly
141141

142142
- name: publish_release
143143
pull: default

.github/workflows/ci.yaml

Lines changed: 96 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
name: Dotty CI
22

3-
on: [push, pull_request]
3+
on:
4+
push:
5+
pull_request:
6+
schedule:
7+
- cron: '0 3 * * *' # Every day at 3 AM
48

59
env:
610
DOTTY_CI_RUN: true
@@ -112,8 +116,11 @@ jobs:
112116
test_sbt:
113117
runs-on: self-hosted
114118
container: akmetiuk/dotty:2020-02-12
115-
if: github.event_name == 'push' &&
116-
startsWith(github.event.ref, 'refs/tags/')
119+
if: (
120+
github.event_name == 'push' &&
121+
startsWith(github.event.ref, 'refs/tags/')
122+
) ||
123+
github.event_name == 'schedule'
117124

118125
steps:
119126
- name: Git Checkout
@@ -146,8 +153,11 @@ jobs:
146153
test_java11:
147154
runs-on: self-hosted
148155
container: akmetiuk/dotty:2020-02-12
149-
if: github.event_name == 'push' &&
150-
startsWith(github.event.ref, 'refs/tags/')
156+
if: (
157+
github.event_name == 'push' &&
158+
startsWith(github.event.ref, 'refs/tags/')
159+
) ||
160+
github.event_name == 'schedule'
151161

152162
steps:
153163
- name: Git Checkout
@@ -178,3 +188,84 @@ jobs:
178188
run: |
179189
export PATH="/usr/lib/jvm/java-11-openjdk-amd64/bin:$PATH"
180190
./project/scripts/sbt ";compile ;test"
191+
192+
publish_nightly:
193+
runs-on: self-hosted
194+
container: akmetiuk/dotty:2020-02-12
195+
needs: [test, test_bootstrapped, community_build, test_sbt, test_java11]
196+
if: github.event_name == 'schedule'
197+
env:
198+
NIGHTLYBUILD: yes
199+
PGP_PW: ${{ secrets.PGP_PW }} # PGP passphrase
200+
PGP_SECRET: ${{ secrets.PGP_SECRET }} # Export your private and public PGP key to an *.asc file, take the file's contents as a string
201+
SONATYPE_PW: ${{ secrets.SONATYPE_PW }}
202+
SONATYPE_USER: ${{ secrets.SONATYPE_USER }}
203+
204+
steps:
205+
- name: Git Checkout
206+
uses: actions/checkout@v2
207+
208+
- name: Cache Ivy
209+
uses: actions/[email protected]
210+
with:
211+
path: /root/.ivy2/cache
212+
key: ${{ runner.os }}-ivy-${{ hashFiles('**/build.sbt') }}
213+
restore-keys: ${{ runner.os }}-ivy-
214+
215+
- name: Cache SBT
216+
uses: actions/[email protected]
217+
with:
218+
path: /root/.sbt
219+
key: ${{ runner.os }}-sbt-${{ hashFiles('project/**') }}
220+
restore-keys: ${{ runner.os }}-sbt-
221+
222+
- name: Cache Coursier and Mill
223+
uses: actions/[email protected]
224+
with:
225+
path: /root/.cache
226+
key: ${{ runner.os }}-general-${{ hashFiles('**/build.sbt') }}
227+
restore-keys: ${{ runner.os }}-general-
228+
229+
- name: Publish Nightly
230+
run: |
231+
./project/scripts/sbtPublish ";project dotty-bootstrapped ;publishSigned ;sonatypeBundleRelease"
232+
233+
nightly_documentation:
234+
runs-on: self-hosted
235+
container: akmetiuk/dotty:2020-02-12
236+
needs: [publish_nightly]
237+
if: github.event_name == 'schedule'
238+
env:
239+
NIGHTLYBUILD: yes
240+
BOT_TOKEN: ${{ secrets.BOT_TOKEN }} # If you need to change this:
241+
# Generate one at https://github.com/settings/tokens
242+
# Make sure you have the write permissions to the repo: https://github.com/lampepfl/dotty-website
243+
244+
steps:
245+
- name: Git Checkout
246+
uses: actions/checkout@v2
247+
248+
- name: Cache Ivy
249+
uses: actions/[email protected]
250+
with:
251+
path: /root/.ivy2/cache
252+
key: ${{ runner.os }}-ivy-${{ hashFiles('**/build.sbt') }}
253+
restore-keys: ${{ runner.os }}-ivy-
254+
255+
- name: Cache SBT
256+
uses: actions/[email protected]
257+
with:
258+
path: /root/.sbt
259+
key: ${{ runner.os }}-sbt-${{ hashFiles('project/**') }}
260+
restore-keys: ${{ runner.os }}-sbt-
261+
262+
- name: Cache Coursier and Mill
263+
uses: actions/[email protected]
264+
with:
265+
path: /root/.cache
266+
key: ${{ runner.os }}-general-${{ hashFiles('**/build.sbt') }}
267+
restore-keys: ${{ runner.os }}-general-
268+
269+
- name: Nightly Documentation
270+
run: |
271+
./project/scripts/genDocs -doc-snapshot

0 commit comments

Comments
 (0)