Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trigger Release with tag 'releaseTrigger' #256

Merged
merged 8 commits into from
May 19, 2020
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
38 changes: 0 additions & 38 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,41 +52,3 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: "61ab2579215aa8a0024a2f9368fc1298fdecfd18"
run: ./gradlew jacocoTestReport sonarqube --stacktrace -i

deploy:
needs: build
runs-on: ubuntu-latest
name: Deploy with Shipkit
if: github.ref == 'refs/heads/master'
steps:
- name: Sanitize Branch
uses: frabert/replace-string-action@master
id: gitbranch
with:
pattern: 'refs/heads/(.*)'
string: "${{ github.ref }}"
replace-with: '$1'
- uses: actions/checkout@v2
- name: Setup java
uses: actions/setup-java@v1
with:
java-version: 8
- name: Perform Release
uses: eskatos/gradle-command-action@v1
env:
TRAVIS_BRANCH: ${{ steps.gitbranch.outputs.replaced }}
TRAVIS_COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
TRAVIS_PULL_REQUEST: ${{ github.event_name == 'pull_request' }}
GH_WRITE_TOKEN: ${{ secrets.GH_WRITE_TOKEN }}
BINTRAY_USER_NAME: ${{ secrets.BINTRAY_USER_NAME }}
BINTRAY_API_KEY: ${{ secrets.BINTRAY_API_KEY }}
NEXUS_TOKEN_USERNAME: ${{ secrets.NEXUS_TOKEN_USERNAME }}
NEXUS_TOKEN_PASSWORD: ${{ secrets.NEXUS_TOKEN_PASSWORD }}
with:
arguments: ciPerformRelease

# - name: Update Page
# uses: eskatos/gradle-command-action@v1
# with:
# arguments: triggerSiteBuild -P travisApiToken=${{ secrets.TRAVIS_API_TOKEN }} --stacktrace

51 changes: 51 additions & 0 deletions .github/workflows/releaseTrigger.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# This workflow will build a Java project with Gradle
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
aepfli marked this conversation as resolved.
Show resolved Hide resolved
aepfli marked this conversation as resolved.
Show resolved Hide resolved

name: Release

on:
create:
aepfli marked this conversation as resolved.
Show resolved Hide resolved
tags:
- 'releaseTrigger'

jobs:
deploy:
runs-on: ubuntu-latest
name: releasing
steps:
- name: Wait for build to succeed
aepfli marked this conversation as resolved.
Show resolved Hide resolved
aepfli marked this conversation as resolved.
Show resolved Hide resolved
# This steps waits for all github actions builds to suceed, before continueing.
aepfli marked this conversation as resolved.
Show resolved Hide resolved
# Currently we only have our default action, so we can ensure,
# that our codebase builds correctly
uses: jitterbit/await-check-suites@v1
with:
appSlugFilter: 'github-actions'
timeoutSeconds: '300'
- uses: actions/checkout@v2
- name: Setup java
uses: actions/setup-java@v1
with:
java-version: 8
- name: Perform Release
uses: eskatos/gradle-command-action@v1
env:
# shipkit does not support GitHub Actions for now, hence that we simulate to be Travis CI
TRAVIS_BRANCH: master
TRAVIS_COMMIT_MESSAGE: <no commit message, not needed, we do not care about them, if we trigger or not>
TRAVIS_PULL_REQUEST: false
aepfli marked this conversation as resolved.
Show resolved Hide resolved
GH_WRITE_TOKEN: ${{ secrets.GH_WRITE_TOKEN }}
BINTRAY_USER_NAME: ${{ secrets.BINTRAY_USER_NAME }}
BINTRAY_API_KEY: ${{ secrets.BINTRAY_API_KEY }}
NEXUS_TOKEN_USERNAME: ${{ secrets.NEXUS_TOKEN_USERNAME }}
NEXUS_TOKEN_PASSWORD: ${{ secrets.NEXUS_TOKEN_PASSWORD }}
with:
arguments: ciPerformRelease
- name: Delete Tag
if: ${{ always() }}
run: git push --delete origin releaseTrigger
- name: Trigger Website Build
uses: peter-evans/repository-dispatch@v1
with:
token: ${{ secrets.GH_WRITE_TOKEN }}
repository: junit-pioneer/junit-pioneer.github.io
event-type: triggerSiteBuild