-
Notifications
You must be signed in to change notification settings - Fork 1
39 lines (36 loc) · 1.17 KB
/
product.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# This workflow compiles to a directly distributable format and uploads the artifacts.
name: Continuous Product Integration
on:
# successful merge into master
push:
branches:
- master
# manual trigger
workflow_dispatch:
permissions:
contents: write
jobs:
build:
name: Release Products
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set Up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- name: Build with Maven Tycho
run: mvn -B -U clean package
- name: Generate Release Tag
run: |
PROJECT_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
# Replace SNAPSHOT with the current date and time: v5.1.0-SNAPSHOT -> v5.1.0.197001010000
RELEASE_TAG=v$(echo $PROJECT_VERSION | sed "s/-SNAPSHOT/.$(date +%Y%m%d%H%M)/")
echo "release_tag=$RELEASE_TAG" >> $GITHUB_ENV
- name: Release Products
uses: softprops/action-gh-release@v2
with:
files: products/org.palladiosimulator.retriever.product/target/products/*
tag_name: ${{ env.release_tag }}