-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from compscidr/jason/release-workflow
Added a workflow for making releases from tags
- Loading branch information
Showing
1 changed file
with
31 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Build and Deploy | ||
|
||
on: | ||
push: | ||
# Pattern matched against refs/tags | ||
tags: | ||
- '*' # Push events to every tag not containing / | ||
|
||
jobs: | ||
build: | ||
name: Build and Deploy | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: set up JDK | ||
uses: actions/[email protected] | ||
with: | ||
java-version: '17' | ||
distribution: 'temurin' | ||
cache: gradle | ||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
- name: Build and Publish the Common Library to the local Maven repository | ||
run: ./gradlew -PcentralPortalToken='${{ secrets.CENTRAL_PORTAL_TOKEN }}' -PcentralPortalPassword='${{ secrets.CENTRAL_PORTAL_PASSWORD }}' -PsigningInMemoryKeyId='${{ secrets.SIGNING_KEY_ID }}' -PsigningInMemoryKeyPassword='${{ secrets.SIGNING_KEY_PASSWORD }}' -PsigningInMemoryKey='${{ secrets.SIGNING_KEY_IN_MEMORY }}' :icmp-common:publishToMavenLocal | ||
- name: Build and Publish the Android and Linux Libraries to the local Maven repository | ||
run: ./gradlew -PcentralPortalToken='${{ secrets.CENTRAL_PORTAL_TOKEN }}' -PcentralPortalPassword='${{ secrets.CENTRAL_PORTAL_PASSWORD }}' -PsigningInMemoryKeyId='${{ secrets.SIGNING_KEY_ID }}' -PsigningInMemoryKeyPassword='${{ secrets.SIGNING_KEY_PASSWORD }}' -PsigningInMemoryKey='${{ secrets.SIGNING_KEY_IN_MEMORY }}' :icmp-android:publishToMavenLocal :icmp-linux:publishToMavenLocal | ||
- name: Build with Gradle | ||
run: ./gradlew assemble | ||
- name: Deploy to Sonatype / Maven Central | ||
# see signing variable names here: https://github.com/vanniktech/gradle-maven-publish-plugin/blob/da599468864f7be7f0c694f174baa797ba8bf189/plugin/src/integrationTest/kotlin/com/vanniktech/maven/publish/ProjectSpecRunner.kt#L229 | ||
run: ./gradlew -PcentralPortalToken='${{ secrets.CENTRAL_PORTAL_TOKEN }}' -PcentralPortalPassword='${{ secrets.CENTRAL_PORTAL_PASSWORD }}' -PsigningInMemoryKeyId='${{ secrets.SIGNING_KEY_ID }}' -PsigningInMemoryKeyPassword='${{ secrets.SIGNING_KEY_PASSWORD }}' -PsigningInMemoryKey='${{ secrets.SIGNING_KEY_IN_MEMORY }}' publishAllPublicationsToCentralPortal |