Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Update README.md

Update README.md #58

Workflow file for this run

name: Build
on:
push:
branches: [main]
workflow_dispatch:
concurrency:
group: build-and-tag-release
jobs:
bin:
if: github.repository == 'kolmafia/multitool'
name: Build Binaries
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Java 21
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: "21"
cache: "gradle"
- name: Build
env:
ORG_GRADLE_PROJECT_commit: ${{ github.sha }}
run: ./gradlew --no-daemon shadowjar
- name: Upload binaries
uses: actions/upload-artifact@v4
with:
name: releases-${{ matrix.os }}
path: |
build/releases/*.deb
build/releases/*.exe
build/releases/*.dmg
jar:
if: github.repository == 'kolmafia/multitool'
name: Build Release
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Java 21
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: "21"
cache: "gradle"
- name: Build
env:
ORG_GRADLE_PROJECT_commit: ${{ github.sha }}
run: ./gradlew --no-daemon shadowJar
- name: Upload files
uses: actions/upload-artifact@v4
with:
name: dist
path: dist/*.jar
release:
needs: [bin, jar]
if: github.repository == 'kolmafia/multitool'
name: Publish Artifacts
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Retrieve version and tag
run: |
MULTITOOL_VERSION=$(git rev-list --count $GITHUB_SHA)
git tag "r$MULTITOOL_VERSION"
echo "MULTITOOL_VERSION=$MULTITOOL_VERSION" >> $GITHUB_ENV
- name: Download binaries
uses: actions/download-artifact@v4
- name: Release
uses: softprops/action-gh-release@v2
with:
files: |
dist/*.jar
releases-ubuntu-latest/*.deb
releases-macos-latest/*.dmg
tag_name: r${{ env.MULTITOOL_VERSION }}
target_commitish: ${{ github.sha }}
name: ${{ env.MULTITOOL_VERSION }}
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}