feat: Update checked, with support for stable and snapshot builds #63
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish release | |
on: | |
push: | |
branches: | |
- master | |
- develop | |
paths-ignore: | |
- '**.md' | |
- 'versions.yml' | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ ubuntu-latest, windows-latest, macos-latest ] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: adopt | |
java-version: 17 | |
cache: gradle | |
- name: Install FUSE (ubuntu) | |
run: sudo apt-get install libfuse2 fuse binutils | |
if: ${{ matrix.os == 'ubuntu-latest' }} | |
- name: Run custom gradle package | |
run: gradle packageForRelease | |
- name: Upload build | |
uses: actions/upload-artifact@v2 | |
with: | |
name: build-${{ matrix.os }} | |
path: 'releases/*' | |
- name: Stop gradle daemon for Windows cache | |
run: gradle --stop | |
if: ${{ matrix.os == 'windows-latest' }} | |
publish-release: | |
needs: [ build ] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Download all artifacts | |
uses: actions/download-artifact@v2 | |
with: | |
path: artifacts | |
- name: Move all release artifacts into one folder | |
shell: bash | |
run: | | |
mkdir releases | |
mv artifacts/build*/* releases | |
- uses: MineInAbyss/publish-action@develop | |
with: | |
run-gradle-build: false | |
release-files: | | |
releases/* |