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 83de0d6
Showing 1 changed file with 56 additions and 0 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
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
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_name }}
release_name: Release ${{ github.ref_name }}
draft: false
prerelease: false
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./hpi-file/*.hpi
asset_name: oic-auth.hpi
asset_content_type: application/octet-stream

0 comments on commit 83de0d6

Please sign in to comment.