Skip to content

Commit

Permalink
Update CI
Browse files Browse the repository at this point in the history
  • Loading branch information
sam-kirby committed Oct 8, 2024
1 parent d217f24 commit 568e77b
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 49 deletions.
28 changes: 14 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
name: CI

on:
push:
branches:
- '**'
tags-ignore:
- '*.*'
pull_request:
branches:
- '**'
on: push

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Setup Java 8
uses: actions/setup-java@v1
uses: actions/setup-java@v2
with:
java-version: 1.8
java-version: 8
distribution: temurin
- name: Cache Gradle packages
uses: actions/cache@v1
uses: actions/cache@v4
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
- name: Build
run: ./gradlew build
- name: Package
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v4
with:
name: SevPatches-${{ github.sha }}
path: build/libs
if-no-files-found: error
- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: ./build/libs/sevpatches-${{ github.ref_name }}-${{ github.run_number }}.jar
token: ${{ secrets.GITHUB_TOKEN }}
34 changes: 0 additions & 34 deletions .github/workflows/release.yml

This file was deleted.

2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ apply plugin: 'maven-publish'
def buildnumber = null

if (System.getenv('GITHUB_ACTIONS'))
buildnumber = System.getenv('GITHUB_WORKFLOW') == 'Release' ? System.getenv('GITHUB_RUN_NUMBER') : System.getenv('GITHUB_SHA').substring(0, 7)
buildnumber = System.getenv('GITHUB_RUN_NUMBER')

def suffix = buildnumber != null ? buildnumber : 'SNAPSHOT'

Expand Down

0 comments on commit 568e77b

Please sign in to comment.