Skip to content

Commit

Permalink
GitAction deploy setup
Browse files Browse the repository at this point in the history
  • Loading branch information
Finevman committed Jul 13, 2023
1 parent 963faf8 commit 46724d3
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: deploy

on:
push:
tags:
- '*'

jobs:

# Build executable Jar files and package as a Release
deploy-release:

runs-on: ubuntu-latest

permissions:
contents: write

steps:
- name: Check out repository
uses: actions/checkout@v3

- uses: actions/setup-java@v3
with:
java-version: "18"
architecture: x64
distribution: 'temurin'
cache: 'maven'

- name: Create the (jar) packages and libraries
run: mvn --batch-mode clean -Dskiptest -Pproduction

- name: Get version
id: tagName
run: |
VERSION=$(cat ./VERSION)
echo "tag=$VERSION" >> $GITHUB_OUTPUT
- name: Build Zip file
run: |
ARCHIVE_NAME="privacydashboard-${{ steps.tagName.outputs.tag }}"
ARCHIVE_FILE="${ARCHIVE_NAME}.zip"
zip -r ${ARCHIVE_FILE} privacydashboard/target/classes
zip -r ${ARCHIVE_FILE} privacydashboard/target/flow-frontend
- name: Create a release
uses: softprops/action-gh-release@v1
with:
name: v${{ steps.tagName.outputs.tag }}
files: |
./*.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 46724d3

Please sign in to comment.