-
Notifications
You must be signed in to change notification settings - Fork 11
49 lines (43 loc) · 1.52 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#
# CI build that also make relases from the main dev branch.
#
# - skipping CI: add [skip ci] to the commit message
# - skipping release: add [skip release] to the commit message
#
name: CI
on:
push:
branches: [master]
tags-ignore: [v*]
pull_request:
branches: [master]
jobs:
windows_build:
if: "! contains(toJSON(github.event.commits.*.message), '[skip ci]')"
runs-on: windows-latest
steps:
- uses: actions/[email protected] # docs: https://github.com/actions/checkout
with:
fetch-depth: '0'
- name: Run build
run: .\gradlew.bat build --continue
build:
runs-on: ubuntu-latest
needs: windows_build
steps:
- uses: actions/[email protected] # docs: https://github.com/actions/checkout
with:
fetch-depth: '0'
- name: Run build
run: ./gradlew build --continue
- name: Perform release (tagging, changelog, deployment to plugins.gradle.org)
if: github.event_name == 'push'
&& github.ref == 'refs/heads/master'
&& github.repository == 'shipkit/shipkit-changelog'
&& !contains(toJSON(github.event.commits.*.message), '[skip release]')
run: ./gradlew githubRelease publishPlugins
env:
# Gradle env variables docs: https://docs.gradle.org/current/userguide/build_environment.html#sec:gradle_environment_variables
GRADLE_PUBLISH_KEY: ${{ secrets.GRADLE_PUBLISH_KEY }}
GRADLE_PUBLISH_SECRET: ${{ secrets.GRADLE_PUBLISH_SECRET }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}