Skip to content

Commit

Permalink
Update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
Prospector committed Feb 11, 2021
1 parent 7d94779 commit be3d6ac
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 485 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/check_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,22 @@ jobs:
os: [ubuntu-20.04]
runs-on: ${{ matrix.os }}
steps:
- name: checkout repository
- name: Checkout repository
uses: actions/checkout@v2
- name: validate gradle wrapper
with:
fetch-depth: 0
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1
- name: setup jdk ${{ matrix.java }}
- name: Setup JDK ${{ matrix.java }}
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}
- name: make gradle wrapper executable
- name: Make Gradle wrapper executable
if: ${{ runner.os != 'Windows' }}
run: chmod +x ./gradlew
- name: build
- name: Build
run: ./gradlew build --stacktrace --parallel
- name: capture build artifacts
- name: Capture build artifacts
if: ${{ runner.os == 'Linux' && matrix.java == '11' }} # Only upload artifacts built from LTS java on one OS
uses: actions/upload-artifact@v2
with:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
name: Release Patch
on: [workflow_dispatch] # Manual trigger
name: Release
on:
workflow_dispatch:
inputs:
previousVersion:
description: 'Previous Version (Do not include v prefix, must be same as the last version tag! Example: 1.4.1)'
required: true
version:
description: 'Version (Do not include v prefix! Example: 1.4.2)'
required: true
jobs:
build:
release:
strategy:
matrix:
# Use these Java versions
Expand All @@ -14,14 +22,6 @@ jobs:
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Get previous tag
id: previous-tag
uses: WyriHaximus/[email protected]
- name: Get SemVer increments
id: semver
uses: WyriHaximus/[email protected]
with:
version: ${{ steps.previous-tag.outputs.tag }}
- name: Create version tag
uses: actions/github-script@v3
with:
Expand All @@ -30,25 +30,22 @@ jobs:
github.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: "refs/tags/v${{ steps.semver.outputs.patch }}",
ref: "refs/tags/v${{ github.event.inputs.version }}",
sha: context.sha
})
- name: Fetch tags
run: git fetch --tags
- name: Get current tag
id: current-tag
uses: WyriHaximus/[email protected]
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1
- name: Setup jdk ${{ matrix.java }}
- name: Setup JDK ${{ matrix.java }}
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}
- name: Make Gradle wrapper executable
if: ${{ runner.os != 'Windows' }}
run: chmod +x ./gradlew
- name: Build
run: ./gradlew generateChangelog build publish curseforge github publishModrinth --stacktrace --parallel -PlastTag="${{ steps.previous-tag.outputs.tag }}" -PcurrentTag="${{ steps.current-tag.outputs.tag }}"
run: ./gradlew generateChangelog build publish curseforge github publishModrinth --stacktrace --parallel -PlastTag="v${{ github.event.inputs.previousVersion }}" -PcurrentTag="v${{ github.event.inputs.version }}"
env:
MAVEN_URL: ${{ secrets.MAVEN_URL }}
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
Expand Down
71 changes: 0 additions & 71 deletions .github/workflows/release_beta.yml

This file was deleted.

65 changes: 0 additions & 65 deletions .github/workflows/release_major.yml

This file was deleted.

65 changes: 0 additions & 65 deletions .github/workflows/release_major_beta.yml

This file was deleted.

65 changes: 0 additions & 65 deletions .github/workflows/release_minor.yml

This file was deleted.

Loading

0 comments on commit be3d6ac

Please sign in to comment.