-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create build-and-publish-release.yml
- Loading branch information
1 parent
a109ace
commit c785991
Showing
1 changed file
with
35 additions
and
0 deletions.
There are no files selected for viewing
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
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 }}" |