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 2d18b41
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
name: release

on:
push:
tags:
- "v*"

jobs:
release:
name: Release
runs-on: ubuntu-latest

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/*
41 changes: 41 additions & 0 deletions .github/workflows/snapshot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
name: snapshot

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

jobs:
snapshot:
name: Snapshot
runs-on: ubuntu-latest

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
- 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 }}"
automatic_release_tag: latest
prerelease: true
title: Development Build (${{ steps.branch.outputs.name }})
files: |
LICENSE.txt
build/distributions/*

0 comments on commit 2d18b41

Please sign in to comment.