Skip to content

Commit

Permalink
update CI scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
FalsePattern committed Jul 15, 2024
1 parent 6ef55c8 commit e672084
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 103 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Build and test

on:
pull_request:
branches:
- master
push:
branches:
- master

jobs:
build-and-test:
uses: FalsePattern/fpgradle-workflows/.github/workflows/build-and-test.yml@master
with:
timeout: 90
workspace: setupCIWorkspace
client-only: false
35 changes: 0 additions & 35 deletions .github/workflows/build-nightly.yml

This file was deleted.

29 changes: 0 additions & 29 deletions .github/workflows/build-pr.yml

This file was deleted.

52 changes: 13 additions & 39 deletions .github/workflows/release-tags.yml
Original file line number Diff line number Diff line change
@@ -1,47 +1,21 @@
name: Release tagged build
name: Release Tags

on:
push:
tags:
- '*'

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set release version
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV

- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'adopt'
cache: gradle
permissions:
contents: write

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Setup the workspace
run: ./gradlew setupCIWorkspace

- name: Build and publish to Maven, Modrinth, and CurseForge
run: ./gradlew build publish
env:
MAVEN_DEPLOY_USER: ${{ secrets.MAVEN_DEPLOY_USER }}
MAVEN_DEPLOY_PASSWORD: ${{ secrets.MAVEN_DEPLOY_PASSWORD }}
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
CURSEFORGE_TOKEN: ${{ secrets.CURSEFORGE_TOKEN }}
jobs:
release-tags:
uses: FalsePattern/fpgradle-workflows/.github/workflows/release-tags.yml@master
with:
workspace: "setupCIWorkspace"
secrets:
MAVEN_DEPLOY_USER: ${{ secrets.MAVEN_DEPLOY_USER }}
MAVEN_DEPLOY_PASSWORD: ${{ secrets.MAVEN_DEPLOY_PASSWORD }}
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
CURSEFORGE_TOKEN: ${{ secrets.CURSEFORGE_TOKEN }}

- name: Release under current tag
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "${{ env.RELEASE_VERSION }}"
prerelease: false
title: "${{ env.RELEASE_VERSION }}"
files: build/libs/*.jar

0 comments on commit e672084

Please sign in to comment.