Skip to content

Commit

Permalink
ci: improve release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
sqyyy-jar committed Apr 25, 2024
1 parent e0a47a0 commit 4aa8da4
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 12 deletions.
32 changes: 20 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
name: Release

on:
workflow_dispatch:
inputs:
version:
type: string
description: The version without v-prefix
required: true
pre-release:
type: boolean
description: Should this be a pre-release?
default: false

jobs:
release:
runs-on: "ubuntu-latest"
permissions:
contents: write
id-token: write
pull-requests: read

steps:
- uses: actions/checkout@v3
Expand All @@ -18,21 +26,21 @@ jobs:
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
java-version: "17"
distribution: "temurin"
server-id: github
settings-path: ${{ github.workspace }}
settings-path: "${{ github.workspace }}"

- name: Build Jar with Gradle
uses: gradle/gradle-build-action@v2
with:
arguments: paper-standalone:shadowJar

- uses: "marvinpinto/action-automatic-releases@latest"
- uses: ncipollo/release-action@v1
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest-build"
prerelease: false
title: "Latest Release Build"
files: |
paper-standalone/build/libs/*.jar
artifacts: "paper-standalone/build/libs/*.jar"
bodyFile: "CHANGELOG.md"
makeLatest: "${{ !github.event.inputs.pre-release }}"
name: "v${{ github.event.inputs.version }}"
prerelease: "${{ github.event.inputs.pre-release }}"
tag: "release/v${{ github.event.inputs.version }}"
Empty file added CHANGELOG.md
Empty file.

0 comments on commit 4aa8da4

Please sign in to comment.