Skip to content
This repository has been archived by the owner on Mar 7, 2024. It is now read-only.

Commit

Permalink
Add auto releasing
Browse files Browse the repository at this point in the history
  • Loading branch information
duncte123 committed Oct 14, 2020
1 parent 176b62f commit c0247fe
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 112 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# This workflow will build a Java project with Gradle
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle

name: Build and release

on:
push:
branches: [ master ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew build
- name: Create 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 ${{ github.run_number }}
body: |
Automated release
draft: false
prerelease: false
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./build/libs/dunctebot-dashboard-1.0.jar
asset_name: dunctebot-dashboard-1.0.jar
asset_content_type: application/java-archive
6 changes: 5 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,11 @@ plugins {
// java
application
kotlin("jvm") version "1.4.0"
id("com.github.johnrengelman.shadow") version "6.1.0"
}

group = "com.dunctebot"
version = "1.0-SNAPSHOT"
version = "1.0"

repositories {
jcenter()
Expand Down Expand Up @@ -91,4 +92,7 @@ tasks {
gradleVersion = "6.1.1"
distributionType = Wrapper.DistributionType.ALL
}
shadowJar {
archiveClassifier.set("")
}
}
111 changes: 0 additions & 111 deletions src/main/kotlin/com/dunctebot/jda/tojson/JDAToJson.kt

This file was deleted.

0 comments on commit c0247fe

Please sign in to comment.