This repository has been archived by the owner on Nov 15, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
543a058
commit 152df23
Showing
8 changed files
with
243 additions
and
112 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,11 +2,19 @@ on: | |
push: | ||
branches: | ||
- '*' | ||
pull_request: | ||
branches: | ||
- '*' | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
# required by release-tag.sh to correctly identify files changed in the last commit | ||
fetch-depth: 2 | ||
# required by release-tag.sh to allow pushing with another credentials so other workflows are triggered | ||
persist-credentials: false | ||
- uses: actions/setup-java@v1 | ||
with: | ||
java-version: 11 | ||
|
@@ -23,7 +31,16 @@ jobs: | |
run: ./build-ci.sh | ||
- name: Cleanup Gradle Cache | ||
# Remove some files from the Gradle cache, so they aren't cached by GitHub Actions. | ||
# Restoring these files from a GitHub Actions cache might cause problems for future builds. | ||
# Restoring these files from a GitHub Actions cache might cause problems for future builds. | ||
run: | | ||
rm -f ~/.gradle/caches/modules-2/modules-2.lock | ||
rm -f ~/.gradle/caches/modules-2/gc.properties | ||
- name: Release (if required) | ||
run: | | ||
git config user.name github-actions | ||
git config user.email [email protected] | ||
git remote set-url origin https://x-access-token:${{ secrets.ORG_PUBLIC_REPO_RELEASE_TRIGGERING }}@github.com/${GITHUB_REPOSITORY}.git | ||
./release-tag.sh | ||
if: github.ref == 'refs/heads/master' | ||
env: | ||
GH_TOKEN: ${{ secrets.ORG_PUBLIC_REPO_RELEASE_TRIGGERING }} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
on: | ||
push: | ||
tags: | ||
- '*' | ||
env: | ||
ACTIONS_ALLOW_UNSECURE_COMMANDS: true | ||
jobs: | ||
StageMC: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Grab tag name | ||
uses: olegtarasov/get-tag@v2 | ||
id: tagName | ||
- name: Setup Java | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 11 | ||
- name: Upload to Sonatype | ||
run: | | ||
./gradlew publishMavenJavaPublicationToSonatypeStagingRepository \ | ||
-Psign=true \ | ||
-PreleaseVersion="${{ steps.tagName.outputs.tag }}" \ | ||
-PsigningKey="${{ secrets.SIGNING_KEY }}" \ | ||
-PsigningPassword="${{ secrets.SIGNING_PASSWORD }}" \ | ||
-PnexusUsername="${{ secrets.NEXUS_USERNAME }}" \ | ||
-PnexusPassword="${{ secrets.NEXUS_PASSWORD }}" | ||
ReleaseMC: | ||
needs: [StageMC] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Setup Java | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 11 | ||
- name: Release to Maven Central | ||
run: | | ||
./gradlew closeAndReleaseRepository \ | ||
-PnexusUsername="${{ secrets.NEXUS_USERNAME }}" \ | ||
-PnexusPassword="${{ secrets.NEXUS_PASSWORD }}" | ||
ReleaseBintray: | ||
needs: [ReleaseMC] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Upload to Bintray | ||
run: ./release-ci.sh | ||
env: | ||
BINTRAY_USER: ${{ secrets.BINTRAY_USER }} | ||
BINTRAY_KEY: ${{ secrets.BINTRAY_KEY }} | ||
SONATYPE_USER: ${{ secrets.SONATYPE_USER }} | ||
SONATYPE_KEY: ${{ secrets.SONATYPE_KEY }} | ||
Release: | ||
needs: [ReleaseBintray] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Grab tag name | ||
uses: olegtarasov/get-tag@v2 | ||
id: tagName | ||
- name: Dispatch Release Event | ||
uses: peter-evans/[email protected] | ||
with: | ||
token: ${{ secrets.ORG_PUBLIC_REPO_WORKFLOW_TRIGGERING }} | ||
repository: http4k/http4k-connect | ||
event-type: connect-release | ||
client-payload: '{"version": "${{ steps.tagName.outputs.tag }}"}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.