Skip to content

Commit

Permalink
Updated Github Action for release of code and executable Jar files
Browse files Browse the repository at this point in the history
Signed-off-by: Rikard Höglund <rikard.hoglund@ri.se>
  • Loading branch information
rikard-sics committed Mar 20, 2023
1 parent ea14128 commit 2fbcb19
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 45 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: deploy

on:
push:
tags:
- 'v*.*.*'

jobs:

deploy:

runs-on: ubuntu-latest

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

- uses: actions/setup-java@v1
with:
java-version: 8.0.x
architecture: x64

- name: Build Jar files and prepare dependencies for applications
run: |
./build-edhoc-apps.sh
./build-group-apps.sh
- name: Get version
id: tagName
run: |
VERSION=$(cat ./VERSION)
echo "tag=$VERSION" >> $GITHUB_OUTPUT
- name: Build Zip file
run: |
ARCHIVE_NAME="wp3-solutions-${{ steps.tagName.outputs.tag }}"
ARCHIVE_FILE="${ARCHIVE_NAME}.zip"
zip -r ${ARCHIVE_FILE} group-applications/*.jar
zip -ur ${ARCHIVE_FILE} group-applications/lib
zip -ur ${ARCHIVE_FILE} edhoc-applications/*.jar
zip -ur ${ARCHIVE_FILE} edhoc-applications/lib
zip -r Source.zip . -x *.jar -x *.class
- 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 }}

45 changes: 0 additions & 45 deletions .github/workflows/github.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,48 +53,3 @@ jobs:
target-folder: reports
branch: gh-pages

release:

if: github.ref_type == 'tag' && startsWith(github.ref_name, 'v')
needs: build
runs-on: ubuntu-latest

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

- uses: actions/setup-java@v1
with:
java-version: 8.0.x
architecture: x64

- name: Build Jar files and prepare dependencies for applications
run: |
./build-edhoc-apps.sh
./build-group-apps.sh
- name: Get version
id: tagName
run: |
VERSION=$(cat ./VERSION)
echo "tag=$VERSION" >> $GITHUB_OUTPUT
- name: Build Zip file
run: |
ARCHIVE_NAME="wp3-solutions-${{ steps.tagName.outputs.tag }}"
ARCHIVE_FILE="${ARCHIVE_NAME}.zip"
zip -r ${ARCHIVE_FILE} group-applications/*.jar
zip -ur ${ARCHIVE_FILE} group-applications/lib
zip -ur ${ARCHIVE_FILE} edhoc-applications/*.jar
zip -ur ${ARCHIVE_FILE} edhoc-applications/lib
zip -r Source.zip . -x *.jar -x *.class
- 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 2fbcb19

Please sign in to comment.