Skip to content

Commit

Permalink
Create build-and-publish-release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
RadonCoding authored Nov 2, 2023
1 parent a109ace commit c785991
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/build-and-publish-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Build and Publish Release

on:
push:
branches:
- main # Change this to your main branch name

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Java
uses: actions/setup-java@v2
with:
java-version: '11' # You can change this to your desired Java version

- name: Build JAR
run: |
./gradlew build # Change this to your build command, e.g., `mvn package`
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v1
with:
files: path/to/your/jarfile.jar # Replace with the actual path to your JAR file
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Get Release URL
id: release_url
run: echo "Release URL::https://github.com/${{ github.repository }}/releases/tag/${{ steps.create_release.outputs.id }}"

0 comments on commit c785991

Please sign in to comment.