Skip to content

Commit

Permalink
build: update workflows & bump version to beta
Browse files Browse the repository at this point in the history
  • Loading branch information
Citymonstret committed Jan 26, 2024
1 parent 88cb569 commit 61a8326
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 5 deletions.
25 changes: 23 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: Build
name: Build cloud-discord
on:
push:
branches: [ "**" ]
tags-ignore: [ "**" ]
pull_request:
release:
types: [ released ]
types: [ published ]
jobs:
build:
# Only run on PRs if the source branch is on someone else's repo
Expand All @@ -20,8 +20,18 @@ jobs:
distribution: 'temurin'
java-version: 17
- uses: gradle/gradle-build-action@v2
with:
# allow master and *-dev branches to write caches (default is only master/main)
cache-read-only: ${{ github.ref != 'refs/heads/master' && !(endsWith(github.ref, '-dev') && startsWith(github.ref, 'refs/heads/')) }}
- name: Build
run: ./gradlew build
- name: Upload Test Results
if: always()
uses: actions/upload-artifact@v4
with:
name: Test Results
path: |
**/build/test-results/test/TEST-*.xml
- name: Determine Status
run: |
if [ "$(./gradlew properties | awk '/^version:/ { print $2; }' | grep '\-SNAPSHOT')" ]; then
Expand All @@ -43,3 +53,14 @@ jobs:
ORG_GRADLE_PROJECT_sonatypePassword: "${{ secrets.SONATYPE_PASSWORD }}"
ORG_GRADLE_PROJECT_signingKey: "${{ secrets.SIGNING_KEY }}"
ORG_GRADLE_PROJECT_signingPassword: "${{ secrets.SIGNING_PASSWORD }}"
event_file:
name: "Event File"
# Only run on PRs if the source branch is on someone else's repo
if: ${{ github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name }}
runs-on: ubuntu-latest
steps:
- name: Upload
uses: actions/upload-artifact@v4
with:
name: Event File
path: ${{ github.event_path }}
33 changes: 33 additions & 0 deletions .github/workflows/test_results.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Test Results

on:
workflow_run:
workflows: [ "Build cloud-discord" ]
types:
- completed
permissions: { }

jobs:
test-results:
name: Test Results
runs-on: ubuntu-latest
if: github.event.workflow_run.conclusion != 'skipped'
permissions:
checks: write
# needed unless run with comment_mode: off
pull-requests: write
# required by download step to access artifacts API
actions: read
steps:
- name: Download and Extract Artifacts
uses: dawidd6/action-download-artifact@v3
with:
run_id: ${{ github.event.workflow_run.id }}
path: artifacts
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
with:
commit: ${{ github.event.workflow_run.head_sha }}
event_file: artifacts/Event File/event.json
event_name: ${{ github.event.workflow_run.event }}
files: "artifacts/**/*.xml"
2 changes: 1 addition & 1 deletion cloud-javacord/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ plugins {
id("cloud-discord.publishing-conventions")
}

version = "2.0.0-SNAPSHOT"
version = "2.0.0-beta.1"

dependencies {
api(libs.cloud.core)
Expand Down
2 changes: 1 addition & 1 deletion cloud-jda/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ plugins {
id("cloud-discord.publishing-conventions")
}

version = "2.0.0-SNAPSHOT"
version = "2.0.0-beta.1"

dependencies {
api(libs.cloud.core)
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
group=org.incendo
version=1.0.0-SNAPSHOT
version=1.0.0-beta.1
description=Discord integrations for Cloud.

org.gradle.caching=true
Expand Down

0 comments on commit 61a8326

Please sign in to comment.