mirror of
https://github.com/Coloryr/AllMusic.git
synced 2026-11-08 18:54:44 +00:00
58 lines
1.7 KiB
YAML
58 lines
1.7 KiB
YAML
# This workflow uses actions that are not certified by GitHub.
|
|
# They are provided by a third-party and are governed by
|
|
# separate terms of service, privacy policy, and support
|
|
# documentation.
|
|
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
|
|
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle
|
|
|
|
name: AllMusic Server
|
|
|
|
on:
|
|
push:
|
|
# Sequence of patterns matched against refs/heads
|
|
branches:
|
|
- 'releases/**'
|
|
# Sequence of patterns matched against refs/tags
|
|
tags:
|
|
- '*'
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
build_server:
|
|
runs-on: windows-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
with:
|
|
submodules: 'true'
|
|
- name: Set up JDK 25
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
java-version: '25'
|
|
distribution: 'temurin'
|
|
- name: Setup Gradle
|
|
uses: gradle/actions/setup-gradle@v3
|
|
- name: build
|
|
shell: cmd
|
|
run: |
|
|
gradlew :server:buildServer
|
|
- name: update
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: "allmusic_server"
|
|
path: build/
|
|
- name: Create Pre-release and Upload Assets
|
|
if: startsWith(github.ref, 'refs/tags/') && !contains(github.ref_name, 'debug')
|
|
uses: softprops/action-gh-release@v1
|
|
with:
|
|
prerelease: true
|
|
tag_name: ${{ github.ref_name }}
|
|
name: "Pre-release ${{ github.ref_name }}"
|
|
body: "自动构建的预发布版本"
|
|
files: |
|
|
build/*.jar
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|