Skip to content

Commit fcc76e3

Browse files
Updating to github actions
- testing the PR build - testing and releasing an exp version of the jar via Java 15 - making a stable release Also updated the plugin version nd the min GoCD version to 20.9.0
1 parent b6ded1c commit fcc76e3

File tree

4 files changed

+90
-2
lines changed

4 files changed

+90
-2
lines changed

.github/workflows/pr_workflow.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# This workflow will build a Java project with Gradle
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
3+
4+
name: Testing For PRs
5+
6+
on: [ pull_request ]
7+
8+
jobs:
9+
test:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- name: Set up JDK
14+
uses: actions/setup-java@v1
15+
with:
16+
java-version: 15
17+
- name: Echo env
18+
run: env
19+
shell: bash
20+
- name: Build with Gradle
21+
run: ./gradlew assemble check

.github/workflows/release.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
2+
name: Create Stable Release
3+
4+
# Controls when the action will run. Workflow runs when manually triggered using the UI
5+
# or API.
6+
on:
7+
workflow_dispatch:
8+
# Inputs the workflow accepts.
9+
inputs:
10+
prerelease:
11+
description: 'The release should be an experimental release'
12+
default: 'NO'
13+
required: true
14+
15+
jobs:
16+
build_and_release:
17+
runs-on: ubuntu-latest
18+
env:
19+
GITHUB_USER: "gocd-contrib"
20+
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
21+
PRERELEASE: "${{ github.event.inputs.prerelease }}"
22+
steps:
23+
- uses: actions/checkout@v2
24+
with:
25+
fetch-depth: 0
26+
- name: Set up JDK
27+
uses: actions/setup-java@v1
28+
with:
29+
java-version: 15
30+
- name: Release
31+
run: ./gradlew githubRelease
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# This workflow will build a Java project with Gradle
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
3+
4+
name: Test and Build
5+
6+
on:
7+
push:
8+
branches: [ master ]
9+
10+
jobs:
11+
test:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v2
15+
- name: Set up JDK
16+
uses: actions/setup-java@v1
17+
with:
18+
java-version: 15
19+
- name: Test with Gradle
20+
run: ./gradlew assemble check
21+
previewGithubRelease:
22+
needs: test
23+
runs-on: ubuntu-latest
24+
env:
25+
GITHUB_USER: "gocd-contrib"
26+
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
27+
steps:
28+
- uses: actions/checkout@v2
29+
with:
30+
fetch-depth: 0
31+
- name: Set up JDK
32+
uses: actions/setup-java@v1
33+
with:
34+
java-version: 15
35+
- name: Test with Gradle
36+
run: ./gradlew githubRelease

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ apply from: "https://raw.githubusercontent.com/gocd/gocd-plugin-gradle-task-help
1919

2020
gocdPlugin {
2121
id = 'cd.go.authorization.github'
22-
pluginVersion = '3.0.2'
23-
goCdVersion = '19.2.0'
22+
pluginVersion = '3.1.0'
23+
goCdVersion = '20.9.0'
2424
name = 'GitHub OAuth authorization plugin'
2525
description = 'GitHub OAuth authorization plugin for GoCD'
2626
vendorName = 'ThoughtWorks, Inc.'

0 commit comments

Comments
 (0)