Skip to content

Commit

Permalink
Add GitHub Actions workflows for stable and beta deployments
Browse files Browse the repository at this point in the history
Introduces deploy-stable.yml for stable releases triggered by tags starting with 'v*' and deploy-beta.yml for beta releases triggered by tags ending in '-beta'. Both workflows set up JDK 17, cache Gradle packages, and run build, test, and publish steps. This ensures efficient CI/CD for different release channels.
  • Loading branch information
cortiz committed Sep 6, 2024
1 parent 16b9e78 commit 41262d1
Show file tree
Hide file tree
Showing 2 changed files with 84 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/deploy-beta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Test and Publish

on:
push:
tags:
- '*-beta'

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'adopt'

- name: Cache Gradle packages
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Publish Plugin
run: ./gradlew build test publishPlugin
env:
CERTIFICATE_CHAIN: ${{ secrets.CERTIFICATE_CHAIN }}
PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }}
PRIVATE_KEY_PASSWORD: ${{ secrets.PRIVATE_KEY_PASSWORD }}
PUBLISH_TOKEN: ${{ secrets.PUBLISH_TOKEN }}
CHANNEL: beta
42 changes: 42 additions & 0 deletions .github/workflows/deploy-stable.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Test and Publish

on:
push:
tags:
- 'v*'

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'adopt'

- name: Cache Gradle packages
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Publish Plugin
run: ./gradlew build test publishPlugin
env:
CERTIFICATE_CHAIN: ${{ secrets.CERTIFICATE_CHAIN }}
PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }}
PRIVATE_KEY_PASSWORD: ${{ secrets.PRIVATE_KEY_PASSWORD }}
PUBLISH_TOKEN: ${{ secrets.PUBLISH_TOKEN }}
CHANNEL: stable

0 comments on commit 41262d1

Please sign in to comment.