Continuous Product Integration #69
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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@v1 | |
with: | |
files: products/org.palladiosimulator.retriever.product/target/products/* | |
tag_name: ${{ env.release_tag }} |