Skip to content

Commit

Permalink
Add release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
tumbl3w33d committed Jan 30, 2024
1 parent 11f77a7 commit 27aa881
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: 'Github ehex releases'

on:
push:
branches:
- ehex

jobs:
# New build job
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '11'
cache: 'maven'
- name: Build with Maven
run: mvn clean package -DskipTests
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: hpi-file
path: target/*.hpi

# New release job
release:
needs: build
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/oic-auth-ehex-')
steps:
- uses: actions/checkout@v4
- name: Download Artifact
uses: actions/download-artifact@v4
with:
name: hpi-file
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
files: |
*.hpi

0 comments on commit 27aa881

Please sign in to comment.