Skip to content

Commit

Permalink
Merge pull request #18 from compscidr/jason/release-workflow
Browse files Browse the repository at this point in the history
Added a workflow for making releases from tags
  • Loading branch information
compscidr authored Oct 9, 2024
2 parents e639b78 + bcd99a4 commit f94bf65
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/tag.yml
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

0 comments on commit f94bf65

Please sign in to comment.