Skip to content

Commit

Permalink
Added snapshot and tagged release workflows.
Browse files Browse the repository at this point in the history
Signed-off-by: dblock <[email protected]>
  • Loading branch information
dblock committed Feb 29, 2024
1 parent c27a05a commit 906d438
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
name: Publish Release

on:
push:
tags:
- "v*"

jobs:
release:
name: Release
runs-on: ubuntu-latest
permissions: write-all

steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: 11
distribution: temurin

- name: Build and Run Tests
run: |
./gradlew build
./gradlew publishPluginZipPublicationToZipStagingRepository -Dbuild.snapshot=false
- uses: marvinpinto/[email protected]
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
files: |
LICENSE.txt
build/distributions/*
40 changes: 40 additions & 0 deletions .github/workflows/snapshot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
name: Publish Snapshot

on:
push:
branches:
- main
- 2.x

jobs:
snapshot:
name: Snapshot
runs-on: ubuntu-latest
permissions: write-all

steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: 11
distribution: temurin

- name: Build and Run Tests
run: |
./gradlew publishPluginZipPublicationToZipStagingRepository
- name: Extract Branch Name
id: branch
shell: bash
run: echo "name=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT

- uses: marvinpinto/[email protected]
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: true
title: Development Build (${{ steps.branch.outputs.name }})
files: |
LICENSE.txt
build/distributions/*

0 comments on commit 906d438

Please sign in to comment.