Skip to content

i was retarded.

i was retarded. #8

Workflow file for this run

name: do things
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- run: chmod +x ./gradlew
- name: Build with Gradle
uses: gradle/gradle-build-action@bd5760595778326ba7f1441bcf7e88b49de61a25 # v2.6.0
with:
distributions-cache-enabled: true
dependencies-cache-enabled: true
configuration-cache-enabled: true
arguments: build
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: the jar
path: build/libs/*.jar
- name: Get Artifact File Name
id: artifact_name
run: echo "artifact_name=$(basename build/libs/*.jar)" >> $GITHUB_ENV
- name: Create GitHub Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ github.run_number }}
release_name: "Release v${{ github.run_number }}"
body: "Automatically generated release from GitHub Actions."
draft: false
prerelease: false
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: build/libs/${{ env.artifact_name }}
asset_name: ${{ env.artifact_name }}
asset_content_type: application/java-archive
- name: Discord notification
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
DISCORD_USERNAME: AntiP2W-Tools
DISCORD_AVATAR: https://i.imgur.com/VvG5iFz.png
DISCORD_EMBEDS: '[{"title":"New Commit ➡️ Click","description":"[Download ➡️ Click](https://github.com/AzSumPesho/AntiP2W-Addon/releases/latest)","color":43690,"url":"https://github.com/AzSumPesho/AntiP2W-Addon/commit/${{ github.sha }}"}]'
uses: Ilshidur/action-discord@master