Skip to content

Commit

Permalink
Add release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
kum-viadee committed Aug 2, 2024
1 parent bf944c5 commit b6bc95d
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Build and Release

on:
push:
branches:
- main # Change this to your default branch if it's not 'main'

jobs:
build:
runs-on: ubuntu-latest

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

- name: Set up JDK
uses: actions/setup-java@v2
with:
java-version: '11' # Change this to your required Java version

- name: Build with Maven
run: mvn clean package

- name: Get version from pom.xml
id: get_version
run: |
VERSION=$(grep -oPm1 "(?<=<version>)[^<]+" pom.xml)
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ env.VERSION }}
release_name: Release ${{ env.VERSION }}
body: |
This release includes the JAR file built from the latest commit.
files: target/mateo-screenshot-tool.jar
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit b6bc95d

Please sign in to comment.