fix viaversion console spam #209
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: Release | |
on: | |
push: | |
workflow_dispatch: | |
jobs: | |
build: | |
if: "github.event_name == 'workflow_dispatch'" | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/[email protected] | |
- name: Set up JDK 17 | |
uses: actions/[email protected] | |
with: | |
java-version: 17 | |
distribution: temurin | |
cache: gradle | |
- name: Make gradlew executable | |
run: chmod +x ./gradlew | |
- name: Build artifacts | |
run: ./gradlew build | |
- name: Set outputs | |
id: vars | |
run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)" | |
- uses: avakar/tag-and-release@v1 | |
id: release | |
with: | |
tag_name: ${{ steps.vars.outputs.sha_short }} | |
draft: true | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
- name: Clean useless artifacts | |
run: | | |
rm -f \ | |
build/libs/*-dev.jar \ | |
build/libs/*-dev-all.jar | |
- name: Generate Checksum | |
uses: jmgilman/[email protected] | |
with: | |
method: md5 | |
patterns: build/libs/AntiPopup-*.jar | |
- name: upload file on release | |
uses: Fhwang0926/[email protected] | |
with: | |
upload_url: ${{ steps.release.outputs.upload_url }} | |
asset_name: checksum.txt | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
- name: Upload artifacts & release assets | |
uses: nanoufo/[email protected] | |
with: | |
path: build/libs/AntiPopup-*.jar | |
release-upload-url: ${{ steps.release.outputs.upload_url }} | |
upload-release-files: true | |
env: | |
GITHUB_TOKEN: ${{ github.token }} |