diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 56909b69..b9086fdf 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,438 +9,438 @@ permissions: pull-requests: write jobs: -# detect-changes: -# runs-on: ubuntu-latest -# outputs: -# lega-commander: ${{ steps.changes.outputs.lega-commander }} -# e2eTests: ${{ steps.changes.outputs.e2eTests }} -# clearinghouse: ${{ steps.changes.outputs.clearinghouse }} -# crypt4gh: ${{ steps.changes.outputs.crypt4gh }} -# tsd-file-api-client: ${{ steps.changes.outputs.tsd-file-api-client }} -# cega-mock: ${{ steps.changes.outputs.cega-mock }} -# localega-tsd-proxy: ${{ steps.changes.outputs.localega-tsd-proxy }} -# mq-interceptor: ${{ steps.changes.outputs.mq-interceptor }} -# tsd-api-mock: ${{ steps.changes.outputs.tsd-api-mock }} -# steps: -# - uses: actions/checkout@v4 -# - uses: dorny/paths-filter@v3 -# id: changes -# with: -# filters: | -# lega-commander: -# - 'cli/lega-commander/**' -# e2eTests: -# - 'e2eTests/**' -# clearinghouse: -# - 'lib/clearinghouse/**' -# crypt4gh: -# - 'lib/crypt4gh/**' -# tsd-file-api-client: -# - 'lib/tsd-file-api-client/**' -# cega-mock: -# - 'services/cega-mock/**' -# localega-tsd-proxy: -# - 'services/localega-tsd-proxy/**' -# mq-interceptor: -# - 'services/mq-interceptor/**' -# tsd-api-mock: -# - 'services/tsd-api-mock/**' -# -# -# publish-clearinghouse: -# needs: detect-changes -# if: needs.detect-changes.outputs.clearinghouse == 'true' -# runs-on: ubuntu-latest -# permissions: -# contents: write -# packages: write -# pull-requests: write -# steps: -# - uses: actions/checkout@v4 -# with: -# fetch-depth: '0' -# - uses: actions/setup-java@v4 -# with: -# java-version: '21' -# distribution: 'temurin' -# - name: Setup Gradle -# uses: gradle/actions/setup-gradle@v3.5.0 -# - name: Get current version for clearinghouse -# id: version_clearinghouse -# run: | -# CLEARINGHOUSE_VERSION=$(grep -oP 'version = "\K[0-9]+\.[0-9]+\.[0-9]+' lib/clearinghouse/build.gradle.kts) -# echo "clearinghouse_version=$CLEARINGHOUSE_VERSION" >> $GITHUB_OUTPUT -# - name: Bump patch version for clearinghouse -# id: bump_clearinghouse_version -# run: | -# CLEARINGHOUSE_VERSION="${{ steps.version_clearinghouse.outputs.clearinghouse_version }}" -# VERSION_PARTS=(${CLEARINGHOUSE_VERSION//./ }) -# MAJOR=${VERSION_PARTS[0]} -# MINOR=${VERSION_PARTS[1]} -# PATCH=${VERSION_PARTS[2]} -# PATCH=$((PATCH + 1)) -# NEW_CLEARINGHOUSE_VERSION="$MAJOR.$MINOR.$PATCH" -# echo "new_clearinghouse_version=$NEW_CLEARINGHOUSE_VERSION" >> $GITHUB_OUTPUT -# - name: Update version in clearinghouse's build.gradle.kts -# run: sed -i "s#version = \".*\"#version = \"${{ steps.bump_clearinghouse_version.outputs.new_clearinghouse_version }}\"#" lib/clearinghouse/build.gradle.kts -# - name: Release clearinghouse -# run: | -# ./gradlew :lib:clearinghouse:build -# ./gradlew :lib:clearinghouse:publish -# env: -# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} -# - name: Commit and Push Changes -# env: -# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} -# run: | -# BRANCH_NAME=${{ github.ref_name }} -# git config --global user.name 'GitHub Actions' -# git config --global user.email 'actions@github.com' -# for i in {1..3}; do -# git pull https://${{ secrets.GITHUB_TOKEN }}@github.com/ELIXIR-NO/FEGA-Norway.git $BRANCH_NAME -# git add -A -# git commit -m "bump clearinghouse version to ${{ steps.bump_clearinghouse_version.outputs.new_clearinghouse_version }}" -# if git push https://${{ secrets.GITHUB_TOKEN }}@github.com/ELIXIR-NO/FEGA-Norway.git HEAD:refs/heads/$BRANCH_NAME; then -# break -# fi -# sleep 5 -# done -# -# - name: Create GitHub release -# if: success() -# uses: softprops/action-gh-release@v2 -# with: -# target_commitish: ${{ github.head_ref || github.ref_name }} -# token: "${{ secrets.GITHUB_TOKEN }}" -# tag_name: "clearinghouse-${{ steps.bump_clearinghouse_version.outputs.new_clearinghouse_version }}" -# prerelease: false -# name: "Clearinghouse-${{ steps.bump_clearinghouse_version.outputs.new_clearinghouse_version }}" -# -# publish-crypt4gh: -# needs: detect-changes -# if: needs.detect-changes.outputs.crypt4gh == 'true' -# runs-on: ubuntu-latest -# permissions: -# contents: write -# packages: write -# pull-requests: write -# steps: -# - uses: actions/checkout@v4 -# with: -# fetch-depth: '0' -# - uses: actions/setup-java@v4 -# with: -# java-version: '21' -# distribution: 'temurin' -# - name: Setup Gradle -# uses: gradle/actions/setup-gradle@v3.5.0 -# - name: Get current version for crypt4gh -# id: version_crypt4gh -# run: | -# CRYPT4GH_VERSION=$(grep -oP 'version = "\K[0-9]+\.[0-9]+\.[0-9]+' lib/crypt4gh/build.gradle.kts) -# echo "crypt4gh_version=$CRYPT4GH_VERSION" >> $GITHUB_OUTPUT -# - name: Bump patch version for crypt4gh -# id: bump_crypt4gh_version -# run: | -# CRYPT4GH_VERSION="${{ steps.version_crypt4gh.outputs.crypt4gh_version }}" -# VERSION_PARTS=(${CRYPT4GH_VERSION//./ }) -# MAJOR=${VERSION_PARTS[0]} -# MINOR=${VERSION_PARTS[1]} -# PATCH=${VERSION_PARTS[2]} -# PATCH=$((PATCH + 1)) -# NEW_CRYPT4GH_VERSION="$MAJOR.$MINOR.$PATCH" -# echo "new_crypt4gh_version=$NEW_CRYPT4GH_VERSION" >> $GITHUB_OUTPUT -# - name: Update version in crypt4gh's build.gradle.kts -# run: sed -i "s#version = \".*\"#version = \"${{ steps.bump_crypt4gh_version.outputs.new_crypt4gh_version }}\"#" lib/crypt4gh/build.gradle.kts -# - name: Release crypt4gh -# run: | -# ./gradlew :lib:crypt4gh:build -# ./gradlew :lib:crypt4gh:publish -# env: -# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} -# - name: Commit and Push Changes -# env: -# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} -# run: | -# BRANCH_NAME=${{ github.ref_name }} -# git config --global user.name 'GitHub Actions' -# git config --global user.email 'actions@github.com' -# for i in {1..3}; do -# git pull https://${{ secrets.GITHUB_TOKEN }}@github.com/ELIXIR-NO/FEGA-Norway.git $BRANCH_NAME -# git add -A -# git commit -m "bump crypt4gh version to ${{ steps.bump_crypt4gh_version.outputs.new_crypt4gh_version }}" -# if git push https://${{ secrets.GITHUB_TOKEN }}@github.com/ELIXIR-NO/FEGA-Norway.git HEAD:refs/heads/$BRANCH_NAME; then -# break -# fi -# sleep 5 -# done -# - name: Create GitHub release -# if: success() -# uses: softprops/action-gh-release@v2 -# with: -# target_commitish: ${{ github.head_ref || github.ref_name }} -# token: "${{ secrets.GITHUB_TOKEN }}" -# tag_name: "crypt4gh-${{ steps.bump_crypt4gh_version.outputs.new_crypt4gh_version }}" -# prerelease: false -# name: "Crypt4gh-${{ steps.bump_crypt4gh_version.outputs.new_crypt4gh_version }}" -# -# publish-tsd-file-api-client: -# needs: detect-changes -# if: needs.detect-changes.outputs.tsd-file-api-client == 'true' -# runs-on: ubuntu-latest -# permissions: -# contents: write -# packages: write -# pull-requests: write -# steps: -# - uses: actions/checkout@v4 -# with: -# fetch-depth: '0' -# - uses: actions/setup-java@v4 -# with: -# java-version: '21' -# distribution: 'temurin' -# - name: Setup Gradle -# uses: gradle/actions/setup-gradle@v3.5.0 -# - name: Get current version for tsd-file-api-client -# id: version_tsd-file-api-client -# run: | -# TSD_FILE_API_CLIENT_VERSION=$(grep -oP 'version = "\K[0-9]+\.[0-9]+\.[0-9]+' lib/tsd-file-api-client/build.gradle.kts) -# echo "tsd-file-api-client_version=$TSD_FILE_API_CLIENT_VERSION" >> $GITHUB_OUTPUT -# - name: Bump patch version for tsd-file-api-client -# id: bump_tsd-file-api-client_version -# run: | -# TSD_FILE_API_CLIENT_VERSION="${{ steps.version_tsd-file-api-client.outputs.tsd-file-api-client_version }}" -# VERSION_PARTS=(${TSD_FILE_API_CLIENT_VERSION//./ }) -# MAJOR=${VERSION_PARTS[0]} -# MINOR=${VERSION_PARTS[1]} -# PATCH=${VERSION_PARTS[2]} -# PATCH=$((PATCH + 1)) -# NEW_TSD_FILE_API_CLIENT_VERSION="$MAJOR.$MINOR.$PATCH" -# echo "new_tsd-file-api-client_version=$NEW_TSD_FILE_API_CLIENT_VERSION" >> $GITHUB_OUTPUT -# - name: Update version in tsd-file-api-client's build.gradle.kts -# run: sed -i "s#version = \".*\"#version = \"${{ steps.bump_tsd-file-api-client_version.outputs.new_tsd-file-api-client_version }}\"#" lib/tsd-file-api-client/build.gradle.kts -# - name: Release tsd-file-api-client -# run: | -# ./gradlew :lib:tsd-file-api-client:build -# ./gradlew :lib:tsd-file-api-client:publish -# env: -# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} -# - name: Commit and Push Changes -# env: -# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} -# run: | -# BRANCH_NAME=${{ github.ref_name }} -# git config --global user.name 'GitHub Actions' -# git config --global user.email 'actions@github.com' -# for i in {1..3}; do -# git pull https://${{ secrets.GITHUB_TOKEN }}@github.com/ELIXIR-NO/FEGA-Norway.git $BRANCH_NAME -# git add -A -# git commit -m "bump tsd-file-api-client version to ${{ steps.bump_tsd-file-api-client_version.outputs.new_tsd-file-api-client_version }}" -# if git push https://${{ secrets.GITHUB_TOKEN }}@github.com/ELIXIR-NO/FEGA-Norway.git HEAD:refs/heads/$BRANCH_NAME; then -# break -# fi -# sleep 5 -# done -# - name: Create GitHub release -# if: success() -# uses: softprops/action-gh-release@v2 -# with: -# target_commitish: ${{ github.head_ref || github.ref_name }} -# token: "${{ secrets.GITHUB_TOKEN }}" -# tag_name: "crypt4gh-${{ steps.bump_tsd-file-api-client_version.outputs.new_tsd-file-api-client_version }}" -# prerelease: false -# name: "Crypt4gh-${{ steps.bump_tsd-file-api-client_version.outputs.new_tsd-file-api-client_version }}" + detect-changes: + runs-on: ubuntu-latest + outputs: + lega-commander: ${{ steps.changes.outputs.lega-commander }} + e2eTests: ${{ steps.changes.outputs.e2eTests }} + clearinghouse: ${{ steps.changes.outputs.clearinghouse }} + crypt4gh: ${{ steps.changes.outputs.crypt4gh }} + tsd-file-api-client: ${{ steps.changes.outputs.tsd-file-api-client }} + cega-mock: ${{ steps.changes.outputs.cega-mock }} + localega-tsd-proxy: ${{ steps.changes.outputs.localega-tsd-proxy }} + mq-interceptor: ${{ steps.changes.outputs.mq-interceptor }} + tsd-api-mock: ${{ steps.changes.outputs.tsd-api-mock }} + steps: + - uses: actions/checkout@v4 + - uses: dorny/paths-filter@v3 + id: changes + with: + filters: | + lega-commander: + - 'cli/lega-commander/**' + e2eTests: + - 'e2eTests/**' + clearinghouse: + - 'lib/clearinghouse/**' + crypt4gh: + - 'lib/crypt4gh/**' + tsd-file-api-client: + - 'lib/tsd-file-api-client/**' + cega-mock: + - 'services/cega-mock/**' + localega-tsd-proxy: + - 'services/localega-tsd-proxy/**' + mq-interceptor: + - 'services/mq-interceptor/**' + tsd-api-mock: + - 'services/tsd-api-mock/**' + + + publish-clearinghouse: + needs: detect-changes + if: needs.detect-changes.outputs.clearinghouse == 'true' + runs-on: ubuntu-latest + permissions: + contents: write + packages: write + pull-requests: write + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: '0' + - uses: actions/setup-java@v4 + with: + java-version: '21' + distribution: 'temurin' + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v3.5.0 + - name: Get current version for clearinghouse + id: version_clearinghouse + run: | + CLEARINGHOUSE_VERSION=$(grep -oP 'version = "\K[0-9]+\.[0-9]+\.[0-9]+' lib/clearinghouse/build.gradle.kts) + echo "clearinghouse_version=$CLEARINGHOUSE_VERSION" >> $GITHUB_OUTPUT + - name: Bump patch version for clearinghouse + id: bump_clearinghouse_version + run: | + CLEARINGHOUSE_VERSION="${{ steps.version_clearinghouse.outputs.clearinghouse_version }}" + VERSION_PARTS=(${CLEARINGHOUSE_VERSION//./ }) + MAJOR=${VERSION_PARTS[0]} + MINOR=${VERSION_PARTS[1]} + PATCH=${VERSION_PARTS[2]} + PATCH=$((PATCH + 1)) + NEW_CLEARINGHOUSE_VERSION="$MAJOR.$MINOR.$PATCH" + echo "new_clearinghouse_version=$NEW_CLEARINGHOUSE_VERSION" >> $GITHUB_OUTPUT + - name: Update version in clearinghouse's build.gradle.kts + run: sed -i "s#version = \".*\"#version = \"${{ steps.bump_clearinghouse_version.outputs.new_clearinghouse_version }}\"#" lib/clearinghouse/build.gradle.kts + - name: Release clearinghouse + run: | + ./gradlew :lib:clearinghouse:build + ./gradlew :lib:clearinghouse:publish + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Commit and Push Changes + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + BRANCH_NAME=${{ github.ref_name }} + git config --global user.name 'GitHub Actions' + git config --global user.email 'actions@github.com' + for i in {1..3}; do + git pull https://${{ secrets.GITHUB_TOKEN }}@github.com/ELIXIR-NO/FEGA-Norway.git $BRANCH_NAME + git add -A + git commit -m "bump clearinghouse version to ${{ steps.bump_clearinghouse_version.outputs.new_clearinghouse_version }}" + if git push https://${{ secrets.GITHUB_TOKEN }}@github.com/ELIXIR-NO/FEGA-Norway.git HEAD:refs/heads/$BRANCH_NAME; then + break + fi + sleep 5 + done + + - name: Create GitHub release + if: success() + uses: softprops/action-gh-release@v2 + with: + target_commitish: ${{ github.head_ref || github.ref_name }} + token: "${{ secrets.GITHUB_TOKEN }}" + tag_name: "clearinghouse-${{ steps.bump_clearinghouse_version.outputs.new_clearinghouse_version }}" + prerelease: false + name: "Clearinghouse-${{ steps.bump_clearinghouse_version.outputs.new_clearinghouse_version }}" + + publish-crypt4gh: + needs: detect-changes + if: needs.detect-changes.outputs.crypt4gh == 'true' + runs-on: ubuntu-latest + permissions: + contents: write + packages: write + pull-requests: write + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: '0' + - uses: actions/setup-java@v4 + with: + java-version: '21' + distribution: 'temurin' + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v3.5.0 + - name: Get current version for crypt4gh + id: version_crypt4gh + run: | + CRYPT4GH_VERSION=$(grep -oP 'version = "\K[0-9]+\.[0-9]+\.[0-9]+' lib/crypt4gh/build.gradle.kts) + echo "crypt4gh_version=$CRYPT4GH_VERSION" >> $GITHUB_OUTPUT + - name: Bump patch version for crypt4gh + id: bump_crypt4gh_version + run: | + CRYPT4GH_VERSION="${{ steps.version_crypt4gh.outputs.crypt4gh_version }}" + VERSION_PARTS=(${CRYPT4GH_VERSION//./ }) + MAJOR=${VERSION_PARTS[0]} + MINOR=${VERSION_PARTS[1]} + PATCH=${VERSION_PARTS[2]} + PATCH=$((PATCH + 1)) + NEW_CRYPT4GH_VERSION="$MAJOR.$MINOR.$PATCH" + echo "new_crypt4gh_version=$NEW_CRYPT4GH_VERSION" >> $GITHUB_OUTPUT + - name: Update version in crypt4gh's build.gradle.kts + run: sed -i "s#version = \".*\"#version = \"${{ steps.bump_crypt4gh_version.outputs.new_crypt4gh_version }}\"#" lib/crypt4gh/build.gradle.kts + - name: Release crypt4gh + run: | + ./gradlew :lib:crypt4gh:build + ./gradlew :lib:crypt4gh:publish + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Commit and Push Changes + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + BRANCH_NAME=${{ github.ref_name }} + git config --global user.name 'GitHub Actions' + git config --global user.email 'actions@github.com' + for i in {1..3}; do + git pull https://${{ secrets.GITHUB_TOKEN }}@github.com/ELIXIR-NO/FEGA-Norway.git $BRANCH_NAME + git add -A + git commit -m "bump crypt4gh version to ${{ steps.bump_crypt4gh_version.outputs.new_crypt4gh_version }}" + if git push https://${{ secrets.GITHUB_TOKEN }}@github.com/ELIXIR-NO/FEGA-Norway.git HEAD:refs/heads/$BRANCH_NAME; then + break + fi + sleep 5 + done + - name: Create GitHub release + if: success() + uses: softprops/action-gh-release@v2 + with: + target_commitish: ${{ github.head_ref || github.ref_name }} + token: "${{ secrets.GITHUB_TOKEN }}" + tag_name: "crypt4gh-${{ steps.bump_crypt4gh_version.outputs.new_crypt4gh_version }}" + prerelease: false + name: "Crypt4gh-${{ steps.bump_crypt4gh_version.outputs.new_crypt4gh_version }}" + + publish-tsd-file-api-client: + needs: detect-changes + if: needs.detect-changes.outputs.tsd-file-api-client == 'true' + runs-on: ubuntu-latest + permissions: + contents: write + packages: write + pull-requests: write + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: '0' + - uses: actions/setup-java@v4 + with: + java-version: '21' + distribution: 'temurin' + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v3.5.0 + - name: Get current version for tsd-file-api-client + id: version_tsd-file-api-client + run: | + TSD_FILE_API_CLIENT_VERSION=$(grep -oP 'version = "\K[0-9]+\.[0-9]+\.[0-9]+' lib/tsd-file-api-client/build.gradle.kts) + echo "tsd-file-api-client_version=$TSD_FILE_API_CLIENT_VERSION" >> $GITHUB_OUTPUT + - name: Bump patch version for tsd-file-api-client + id: bump_tsd-file-api-client_version + run: | + TSD_FILE_API_CLIENT_VERSION="${{ steps.version_tsd-file-api-client.outputs.tsd-file-api-client_version }}" + VERSION_PARTS=(${TSD_FILE_API_CLIENT_VERSION//./ }) + MAJOR=${VERSION_PARTS[0]} + MINOR=${VERSION_PARTS[1]} + PATCH=${VERSION_PARTS[2]} + PATCH=$((PATCH + 1)) + NEW_TSD_FILE_API_CLIENT_VERSION="$MAJOR.$MINOR.$PATCH" + echo "new_tsd-file-api-client_version=$NEW_TSD_FILE_API_CLIENT_VERSION" >> $GITHUB_OUTPUT + - name: Update version in tsd-file-api-client's build.gradle.kts + run: sed -i "s#version = \".*\"#version = \"${{ steps.bump_tsd-file-api-client_version.outputs.new_tsd-file-api-client_version }}\"#" lib/tsd-file-api-client/build.gradle.kts + - name: Release tsd-file-api-client + run: | + ./gradlew :lib:tsd-file-api-client:build + ./gradlew :lib:tsd-file-api-client:publish + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Commit and Push Changes + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + BRANCH_NAME=${{ github.ref_name }} + git config --global user.name 'GitHub Actions' + git config --global user.email 'actions@github.com' + for i in {1..3}; do + git pull https://${{ secrets.GITHUB_TOKEN }}@github.com/ELIXIR-NO/FEGA-Norway.git $BRANCH_NAME + git add -A + git commit -m "bump tsd-file-api-client version to ${{ steps.bump_tsd-file-api-client_version.outputs.new_tsd-file-api-client_version }}" + if git push https://${{ secrets.GITHUB_TOKEN }}@github.com/ELIXIR-NO/FEGA-Norway.git HEAD:refs/heads/$BRANCH_NAME; then + break + fi + sleep 5 + done + - name: Create GitHub release + if: success() + uses: softprops/action-gh-release@v2 + with: + target_commitish: ${{ github.head_ref || github.ref_name }} + token: "${{ secrets.GITHUB_TOKEN }}" + tag_name: "crypt4gh-${{ steps.bump_tsd-file-api-client_version.outputs.new_tsd-file-api-client_version }}" + prerelease: false + name: "Crypt4gh-${{ steps.bump_tsd-file-api-client_version.outputs.new_tsd-file-api-client_version }}" + + publish-localega_tsd_proxy: + needs: detect-changes + if: needs.detect-changes.outputs.localega-tsd-proxy == 'true' + runs-on: ubuntu-latest + permissions: + contents: write + packages: write + pull-requests: write + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + java-version: '21' + distribution: 'temurin' + - name: cache gradle packages + uses: actions/cache@v4 + with: + path: | + ~/.gradle/cache + ~/.gradle/wrapper + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} + restore-keys: | + ${{ runner.os }}-gradle- + - name: Build with Gradle + run: ./gradlew services:localega-tsd-proxy:assemble + - name: Get current version for localega_tsd_proxy + id: version_localega_tsd_proxy + run: | + LOCALEGA_TSD_PROXY_VERSION=$(grep -oP 'version = "\K[0-9]+\.[0-9]+\.[0-9]+' services/localega-tsd-proxy/build.gradle.kts) + echo "localega_tsd_proxy_version=$LOCALEGA_TSD_PROXY_VERSION" >> $GITHUB_OUTPUT + - name: Bump patch version for localega_tsd_proxy + id: bump_localega_tsd_proxy_version + run: | + LOCALEGA_TSD_PROXY_VERSION="${{ steps.version_localega_tsd_proxy.outputs.localega_tsd_proxy_version }}" + VERSION_PARTS=(${LOCALEGA_TSD_PROXY_VERSION//./ }) + MAJOR=${VERSION_PARTS[0]} + MINOR=${VERSION_PARTS[1]} + PATCH=${VERSION_PARTS[2]} + PATCH=$((PATCH + 1)) + NEW_LOCALEGA_TSD_PROXY_VERSION="$MAJOR.$MINOR.$PATCH" + echo "new_localega_tsd_proxy_version=$NEW_LOCALEGA_TSD_PROXY_VERSION" >> $GITHUB_OUTPUT + - name: Update version in localega_tsd_proxy's build.gradle.kts + run: sed -i "s#version = \".*\"#version = \"${{ steps.bump_localega_tsd_proxy_version.outputs.new_localega_tsd_proxy_version }}\"#" services/localega-tsd-proxy/build.gradle.kts + - name: Set Repository Name + id: repo_name + run: | + REPO_NAME=$(echo "${{ github.repository }}" | tr '[:upper:]' '[:lower:]') + echo "repo_name=$REPO_NAME" >> $GITHUB_ENV + - name: Log in to the Github Container registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Build and push + uses: docker/build-push-action@v6 + with: + context: ./services/localega-tsd-proxy + push: true + no-cache: 'true' + tags: | + ghcr.io/${{ env.repo_name }}:localega-tsd-proxy-${{ steps.bump_localega_tsd_proxy_version.outputs.new_localega_tsd_proxy_version }} + ghcr.io/${{ env.repo_name }}:localega-tsd-proxy-latest + labels: | + org.opencontainers.image.source=${{ github.event.repository.clone_url }} + org.opencontainers.image.created=$(date -u +'%Y-%m-%dT%H:%M:%SZ') + org.opencontainers.image.revision=${{ github.sha }} + - name: Commit and Push Changes + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + BRANCH_NAME=${{ github.ref_name }} + git config --global user.name 'GitHub Actions' + git config --global user.email 'actions@github.com' + for i in {1..3}; do + git pull https://${{ secrets.GITHUB_TOKEN }}@github.com/ELIXIR-NO/FEGA-Norway.git $BRANCH_NAME + git add -A + git commit -m "bump localega_tsd_proxy version to ${{ steps.bump_localega_tsd_proxy_version.outputs.new_localega_tsd_proxy_version }}" + if git push https://${{ secrets.GITHUB_TOKEN }}@github.com/ELIXIR-NO/FEGA-Norway.git HEAD:refs/heads/$BRANCH_NAME; then + break + fi + sleep 5 + done + - name: Create GitHub release + if: success() + uses: softprops/action-gh-release@v2 + with: + target_commitish: ${{ github.head_ref || github.ref_name }} + token: "${{ secrets.GITHUB_TOKEN }}" + tag_name: "localega_tsd_proxy-${{ steps.bump_localega_tsd_proxy_version.outputs.new_localega_tsd_proxy_version }}" + prerelease: false + name: "Localega_tsd_proxy-${{ steps.bump_localega_tsd_proxy_version.outputs.new_localega_tsd_proxy_version }}" + + publish-tsd_api_mock: + needs: detect-changes + if: needs.detect-changes.outputs.tsd-api-mock == 'true' + runs-on: ubuntu-latest + permissions: + contents: write + packages: write + pull-requests: write + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + java-version: '21' + distribution: 'temurin' + - name: cache gradle packages + uses: actions/cache@v4 + with: + path: | + ~/.gradle/cache + ~/.gradle/wrapper + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} + restore-keys: | + ${{ runner.os }}-gradle- + - name: Build with Gradle + run: ./gradlew :services:tsd-api-mock:assemble + - name: Get current version for tsd_api_mock + id: version_tsd_api_mock + run: | + TSD_API_MOCK_VERSION=$(grep -oP 'version = "\K[0-9]+\.[0-9]+\.[0-9]+' services/tsd-api-mock/build.gradle.kts) + echo "tsd_api_mock_version=$TSD_API_MOCK_VERSION" >> $GITHUB_OUTPUT + - name: Bump patch version for tsd_api_mock + id: bump_tsd_api_mock_version + run: | + TSD_API_MOCK_VERSION="${{ steps.version_tsd_api_mock.outputs.tsd_api_mock_version }}" + VERSION_PARTS=(${TSD_API_MOCK_VERSION//./ }) + MAJOR=${VERSION_PARTS[0]} + MINOR=${VERSION_PARTS[1]} + PATCH=${VERSION_PARTS[2]} + PATCH=$((PATCH + 1)) + NEW_TSD_API_MOCK_VERSION="$MAJOR.$MINOR.$PATCH" + echo "new_tsd_api_mock_version=$NEW_TSD_API_MOCK_VERSION" >> $GITHUB_OUTPUT + - name: Update version in tsd_api_mock's build.gradle.kts + run: sed -i "s#version = \".*\"#version = \"${{ steps.bump_tsd_api_mock_version.outputs.new_tsd_api_mock_version }}\"#" services/tsd-api-mock/build.gradle.kts + - name: Set Repository Name + id: repo_name + run: | + REPO_NAME=$(echo "${{ github.repository }}" | tr '[:upper:]' '[:lower:]') + echo "repo_name=$REPO_NAME" >> $GITHUB_ENV + - name: Log in to the Github Container registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Build and push + uses: docker/build-push-action@v6 + with: + context: ./services/tsd-api-mock + push: true + no-cache: 'true' + tags: | + ghcr.io/${{ env.repo_name }}:tsd-api-mock-${{ steps.bump_tsd_api_mock_version.outputs.new_tsd_api_mock_version }} + ghcr.io/${{ env.repo_name }}:tsd-api-mock-latest + labels: | + org.opencontainers.image.source=${{ github.event.repository.clone_url }} + org.opencontainers.image.created=$(date -u +'%Y-%m-%dT%H:%M:%SZ') + org.opencontainers.image.revision=${{ github.sha }} + - name: Commit and Push Changes + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + BRANCH_NAME=${{ github.ref_name }} + git config --global user.name 'GitHub Actions' + git config --global user.email 'actions@github.com' + for i in {1..3}; do + git pull https://${{ secrets.GITHUB_TOKEN }}@github.com/ELIXIR-NO/FEGA-Norway.git $BRANCH_NAME + git add -A + git commit -m "bump tsd_api_mock version to ${{ steps.bump_tsd_api_mock_version.outputs.new_tsd_api_mock_version }}" + if git push https://${{ secrets.GITHUB_TOKEN }}@github.com/ELIXIR-NO/FEGA-Norway.git HEAD:refs/heads/$BRANCH_NAME; then + break + fi + sleep 5 + done + - name: Create GitHub release + if: success() + uses: softprops/action-gh-release@v2 + with: + target_commitish: ${{ github.head_ref || github.ref_name }} + token: "${{ secrets.GITHUB_TOKEN }}" + tag_name: "tsd_api_mock-${{ steps.bump_tsd_api_mock_version.outputs.new_tsd_api_mock_version }}" + prerelease: false + name: "Tsd_api_mock-${{ steps.bump_tsd_api_mock_version.outputs.new_tsd_api_mock_version }}" -# publish-localega_tsd_proxy: -## needs: detect-changes -## if: needs.detect-changes.outputs.localega-tsd-proxy == 'true' -# runs-on: ubuntu-latest -# permissions: -# contents: write -# packages: write -# pull-requests: write -# steps: -# - uses: actions/checkout@v4 -# - uses: actions/setup-java@v4 -# with: -# java-version: '21' -# distribution: 'temurin' -# - name: cache gradle packages -# uses: actions/cache@v4 -# with: -# path: | -# ~/.gradle/cache -# ~/.gradle/wrapper -# key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} -# restore-keys: | -# ${{ runner.os }}-gradle- -# - name: Build with Gradle -# run: ./gradlew services:localega-tsd-proxy:assemble -# - name: Get current version for localega_tsd_proxy -# id: version_localega_tsd_proxy -# run: | -# LOCALEGA_TSD_PROXY_VERSION=$(grep -oP 'version = "\K[0-9]+\.[0-9]+\.[0-9]+' services/localega-tsd-proxy/build.gradle.kts) -# echo "localega_tsd_proxy_version=$LOCALEGA_TSD_PROXY_VERSION" >> $GITHUB_OUTPUT -# - name: Bump patch version for localega_tsd_proxy -# id: bump_localega_tsd_proxy_version -# run: | -# LOCALEGA_TSD_PROXY_VERSION="${{ steps.version_localega_tsd_proxy.outputs.localega_tsd_proxy_version }}" -# VERSION_PARTS=(${LOCALEGA_TSD_PROXY_VERSION//./ }) -# MAJOR=${VERSION_PARTS[0]} -# MINOR=${VERSION_PARTS[1]} -# PATCH=${VERSION_PARTS[2]} -# PATCH=$((PATCH + 1)) -# NEW_LOCALEGA_TSD_PROXY_VERSION="$MAJOR.$MINOR.$PATCH" -# echo "new_localega_tsd_proxy_version=$NEW_LOCALEGA_TSD_PROXY_VERSION" >> $GITHUB_OUTPUT -# - name: Update version in localega_tsd_proxy's build.gradle.kts -# run: sed -i "s#version = \".*\"#version = \"${{ steps.bump_localega_tsd_proxy_version.outputs.new_localega_tsd_proxy_version }}\"#" services/localega-tsd-proxy/build.gradle.kts -# - name: Set Repository Name -# id: repo_name -# run: | -# REPO_NAME=$(echo "${{ github.repository }}" | tr '[:upper:]' '[:lower:]') -# echo "repo_name=$REPO_NAME" >> $GITHUB_ENV -# - name: Log in to the Github Container registry -# uses: docker/login-action@v3 -# with: -# registry: ghcr.io -# username: ${{ github.actor }} -# password: ${{ secrets.GITHUB_TOKEN }} -# - name: Build and push -# uses: docker/build-push-action@v6 -# with: -# context: ./services/localega-tsd-proxy -# push: true -# no-cache: 'true' -# tags: | -# ghcr.io/${{ env.repo_name }}:localega-tsd-proxy-${{ steps.bump_localega_tsd_proxy_version.outputs.new_localega_tsd_proxy_version }} -# ghcr.io/${{ env.repo_name }}:localega-tsd-proxy-latest -# labels: | -# org.opencontainers.image.source=${{ github.event.repository.clone_url }} -# org.opencontainers.image.created=$(date -u +'%Y-%m-%dT%H:%M:%SZ') -# org.opencontainers.image.revision=${{ github.sha }} -# - name: Commit and Push Changes -# env: -# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} -# run: | -# BRANCH_NAME=${{ github.ref_name }} -# git config --global user.name 'GitHub Actions' -# git config --global user.email 'actions@github.com' -# for i in {1..3}; do -# git pull https://${{ secrets.GITHUB_TOKEN }}@github.com/ELIXIR-NO/FEGA-Norway.git $BRANCH_NAME -# git add -A -# git commit -m "bump localega_tsd_proxy version to ${{ steps.bump_localega_tsd_proxy_version.outputs.new_localega_tsd_proxy_version }}" -# if git push https://${{ secrets.GITHUB_TOKEN }}@github.com/ELIXIR-NO/FEGA-Norway.git HEAD:refs/heads/$BRANCH_NAME; then -# break -# fi -# sleep 5 -# done -# - name: Create GitHub release -# if: success() -# uses: softprops/action-gh-release@v2 -# with: -# target_commitish: ${{ github.head_ref || github.ref_name }} -# token: "${{ secrets.GITHUB_TOKEN }}" -# tag_name: "localega_tsd_proxy-${{ steps.bump_localega_tsd_proxy_version.outputs.new_localega_tsd_proxy_version }}" -# prerelease: false -# name: "Localega_tsd_proxy-${{ steps.bump_localega_tsd_proxy_version.outputs.new_localega_tsd_proxy_version }}" -# -# publish-tsd_api_mock: -# needs: detect-changes -# if: needs.detect-changes.outputs.tsd-api-mock == 'true' -# runs-on: ubuntu-latest -# permissions: -# contents: write -# packages: write -# pull-requests: write -# steps: -# - uses: actions/checkout@v4 -# - uses: actions/setup-java@v4 -# with: -# java-version: '21' -# distribution: 'temurin' -# - name: cache gradle packages -# uses: actions/cache@v4 -# with: -# path: | -# ~/.gradle/cache -# ~/.gradle/wrapper -# key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} -# restore-keys: | -# ${{ runner.os }}-gradle- -# - name: Build with Gradle -# run: ./gradlew :services:tsd-api-mock:assemble -# - name: Get current version for tsd_api_mock -# id: version_tsd_api_mock -# run: | -# TSD_API_MOCK_VERSION=$(grep -oP 'version = "\K[0-9]+\.[0-9]+\.[0-9]+' services/tsd-api-mock/build.gradle.kts) -# echo "tsd_api_mock_version=$TSD_API_MOCK_VERSION" >> $GITHUB_OUTPUT -# - name: Bump patch version for tsd_api_mock -# id: bump_tsd_api_mock_version -# run: | -# TSD_API_MOCK_VERSION="${{ steps.version_tsd_api_mock.outputs.tsd_api_mock_version }}" -# VERSION_PARTS=(${TSD_API_MOCK_VERSION//./ }) -# MAJOR=${VERSION_PARTS[0]} -# MINOR=${VERSION_PARTS[1]} -# PATCH=${VERSION_PARTS[2]} -# PATCH=$((PATCH + 1)) -# NEW_TSD_API_MOCK_VERSION="$MAJOR.$MINOR.$PATCH" -# echo "new_tsd_api_mock_version=$NEW_TSD_API_MOCK_VERSION" >> $GITHUB_OUTPUT -# - name: Update version in tsd_api_mock's build.gradle.kts -# run: sed -i "s#version = \".*\"#version = \"${{ steps.bump_tsd_api_mock_version.outputs.new_tsd_api_mock_version }}\"#" services/tsd-api-mock/build.gradle.kts -# - name: Set Repository Name -# id: repo_name -# run: | -# REPO_NAME=$(echo "${{ github.repository }}" | tr '[:upper:]' '[:lower:]') -# echo "repo_name=$REPO_NAME" >> $GITHUB_ENV -# - name: Log in to the Github Container registry -# uses: docker/login-action@v3 -# with: -# registry: ghcr.io -# username: ${{ github.actor }} -# password: ${{ secrets.GITHUB_TOKEN }} -# - name: Build and push -# uses: docker/build-push-action@v6 -# with: -# context: ./services/tsd-api-mock -# push: true -# no-cache: 'true' -# tags: | -# ghcr.io/${{ env.repo_name }}:tsd-api-mock-${{ steps.bump_tsd_api_mock_version.outputs.new_tsd_api_mock_version }} -# ghcr.io/${{ env.repo_name }}:tsd-api-mock-latest -# labels: | -# org.opencontainers.image.source=${{ github.event.repository.clone_url }} -# org.opencontainers.image.created=$(date -u +'%Y-%m-%dT%H:%M:%SZ') -# org.opencontainers.image.revision=${{ github.sha }} -# - name: Commit and Push Changes -# env: -# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} -# run: | -# BRANCH_NAME=${{ github.ref_name }} -# git config --global user.name 'GitHub Actions' -# git config --global user.email 'actions@github.com' -# for i in {1..3}; do -# git pull https://${{ secrets.GITHUB_TOKEN }}@github.com/ELIXIR-NO/FEGA-Norway.git $BRANCH_NAME -# git add -A -# git commit -m "bump tsd_api_mock version to ${{ steps.bump_tsd_api_mock_version.outputs.new_tsd_api_mock_version }}" -# if git push https://${{ secrets.GITHUB_TOKEN }}@github.com/ELIXIR-NO/FEGA-Norway.git HEAD:refs/heads/$BRANCH_NAME; then -# break -# fi -# sleep 5 -# done -# - name: Create GitHub release -# if: success() -# uses: softprops/action-gh-release@v2 -# with: -# target_commitish: ${{ github.head_ref || github.ref_name }} -# token: "${{ secrets.GITHUB_TOKEN }}" -# tag_name: "tsd_api_mock-${{ steps.bump_tsd_api_mock_version.outputs.new_tsd_api_mock_version }}" -# prerelease: false -# name: "Tsd_api_mock-${{ steps.bump_tsd_api_mock_version.outputs.new_tsd_api_mock_version }}" -# publish-cega-mock: -# needs: detect-changes -# if: needs.detect-changes.outputs.cega-mock == 'true' + needs: detect-changes + if: needs.detect-changes.outputs.cega-mock == 'true' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -512,264 +512,261 @@ jobs: prerelease: false name: "Cega-mock-${{ steps.bump_cega_mock_version.outputs.new_cega_mock_version }}" -# publish-mq-interceptor: -# needs: detect-changes -# if: needs.detect-changes.outputs.mq-interceptor == 'true' -# runs-on: ubuntu-latest -# permissions: -# contents: write -# packages: write -# pull-requests: write -# steps: -# - uses: actions/checkout@v4 -# - name: Get current version for mq-interceptor -# id: version_mq_interceptor -# run: | -# MQ_INTERCEPTOR_VERSION=$(grep -oP 'version = "\K[0-9]+\.[0-9]+\.[0-9]+' services/mq-interceptor/build.gradle.kts) -# echo "mq_interceptor_version=$MQ_INTERCEPTOR_VERSION" >> $GITHUB_OUTPUT -# - name: Bump patch version for mq-interceptor -# id: bump_mq_interceptor_version -# run: | -# MQ_INTERCEPTOR_VERSION="${{ steps.version_mq_interceptor.outputs.mq_interceptor_version }}" -# VERSION_PARTS=(${MQ_INTERCEPTOR_VERSION//./ }) -# MAJOR=${VERSION_PARTS[0]} -# MINOR=${VERSION_PARTS[1]} -# PATCH=${VERSION_PARTS[2]} -# PATCH=$((PATCH + 1)) -# NEW_MQ_INTERCEPTOR_VERSION="$MAJOR.$MINOR.$PATCH" -# echo "new_mq_interceptor_version=$NEW_MQ_INTERCEPTOR_VERSION" >> $GITHUB_OUTPUT -# - name: Update version in mq-interceptor's build.gradle.kts -# run: sed -i "s#version = \".*\"#version = \"${{ steps.bump_mq_interceptor_version.outputs.new_mq_interceptor_version }}\"#" services/mq-interceptor/build.gradle.kts -# - name: Set Repository Name -# id: repo_name -# run: | -# REPO_NAME=$(echo "${{ github.repository }}" | tr '[:upper:]' '[:lower:]') -# echo "repo_name=$REPO_NAME" >> $GITHUB_ENV -# - name: Log in to the Github Container registry -# uses: docker/login-action@v3 -# with: -# registry: ghcr.io -# username: ${{ github.actor }} -# password: ${{ secrets.GITHUB_TOKEN }} -# - name: Build and push -# uses: docker/build-push-action@v6 -# with: -# context: ./services/mq-interceptor -# push: true -# no-cache: 'true' -# tags: | -# ghcr.io/${{ env.repo_name }}:mq-interceptor-${{ steps.bump_mq_interceptor_version.outputs.new_mq_interceptor_version }} -# ghcr.io/${{ env.repo_name }}:mq-interceptor-latest -# labels: | -# org.opencontainers.image.source=${{ github.event.repository.clone_url }} -# org.opencontainers.image.created=$(date -u +'%Y-%m-%dT%H:%M:%SZ') -# org.opencontainers.image.revision=${{ github.sha }} -# - name: Commit and Push Changes -# env: -# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} -# run: | -# BRANCH_NAME=${{ github.ref_name }} -# git config --global user.name 'GitHub Actions' -# git config --global user.email 'actions@github.com' -# for i in {1..3}; do -# git pull https://${{ secrets.GITHUB_TOKEN }}@github.com/ELIXIR-NO/FEGA-Norway.git $BRANCH_NAME -# git add -A -# git commit -m "bump mq-interceptor version to ${{ steps.bump_mq_interceptor_version.outputs.new_mq_interceptor_version }}" -# if git push https://${{ secrets.GITHUB_TOKEN }}@github.com/ELIXIR-NO/FEGA-Norway.git HEAD:refs/heads/$BRANCH_NAME; then -# break -# fi -# sleep 5 -# done -# - name: Create GitHub release -# if: success() -# uses: softprops/action-gh-release@v2 -# with: -# target_commitish: ${{ github.head_ref || github.ref_name }} -# token: "${{ secrets.GITHUB_TOKEN }}" -# tag_name: "mq-interceptor-${{ steps.bump_mq_interceptor_version.outputs.new_mq_interceptor_version }}" -# prerelease: false -# name: "Mq-interceptor-${{ steps.bump_mq_interceptor_version.outputs.new_mq_interceptor_version }}" -# -# publish-lega-commander: -# needs: detect-changes -# if: needs.detect-changes.outputs.lega-commander == 'true' -# runs-on: ubuntu-latest -# permissions: -# contents: write -# packages: write -# pull-requests: write -# steps: -# - name: Set up Go -# uses: actions/setup-go@v5 -# with: -# go-version: 1.22 -# id: go -# - uses: actions/checkout@v4 -# with: -# fetch-depth: 0 -# - name: Get current version for lega-commander -# id: version_lega_commander -# run: | -# LEGA_COMMANDER_VERSION=$(grep -oP 'version = "\K[0-9]+\.[0-9]+\.[0-9]+' cli/lega-commander/build.gradle.kts) -# echo "lega_commander_version=$LEGA_COMMANDER_VERSION" >> $GITHUB_OUTPUT -# - name: Bump patch version for lega-commander -# id: bump_lega_commander_version -# run: | -# LEGA_COMMANDER_VERSION="${{ steps.version_lega_commander.outputs.lega_commander_version }}" -# VERSION_PARTS=(${LEGA_COMMANDER_VERSION//./ }) -# MAJOR=${VERSION_PARTS[0]} -# MINOR=${VERSION_PARTS[1]} -# PATCH=${VERSION_PARTS[2]} -# PATCH=$((PATCH + 1)) -# NEW_LEGA_COMMANDER_VERSION="$MAJOR.$MINOR.$PATCH" -# echo "new_lega_commander_version=$NEW_LEGA_COMMANDER_VERSION" >> $GITHUB_OUTPUT -# - name: Create and push new tag -# run: | -# git tag v${{ steps.bump_lega_commander_version.outputs.new_lega_commander_version }} ${{ github.sha }} -# - name: Run GoReleaser -# uses: goreleaser/goreleaser-action@v6 -# with: -# version: latest -# args: release --clean -# workdir: cli/lega-commander -# env: -# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} -# - name: Update version in lega-commander's build.gradle.kts -# run: sed -i "s#version = \".*\"#version = \"${{ steps.bump_lega_commander_version.outputs.new_lega_commander_version }}\"#" cli/lega-commander/build.gradle.kts -# - name: Commit and Push Changes -# env: -# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} -# run: | -# BRANCH_NAME=${{ github.ref_name }} -# git config --global user.name 'GitHub Actions' -# git config --global user.email 'actions@github.com' -# for i in {1..3}; do -# git pull https://${{ secrets.GITHUB_TOKEN }}@github.com/ELIXIR-NO/FEGA-Norway.git $BRANCH_NAME -# git add -A -# git commit -m "bump lega-commander version to ${{ steps.bump_lega_commander_version.outputs.new_lega_commander_version }}" -# if git push https://${{ secrets.GITHUB_TOKEN }}@github.com/ELIXIR-NO/FEGA-Norway.git HEAD:refs/heads/$BRANCH_NAME; then -# break -# fi -# sleep 5 -# done -# - name: Create GitHub release -# if: success() -# uses: softprops/action-gh-release@v2 -# with: -# target_commitish: ${{ github.head_ref || github.ref_name }} -# token: "${{ secrets.GITHUB_TOKEN }}" -# tag_name: "lega-commander-${{ steps.bump_lega_commander_version.outputs.new_lega_commander_version }}" -# prerelease: false -# name: "Lega-commander-${{ steps.bump_lega_commander_version.outputs.new_lega_commander_version }}" -# -# release-e2eTests: -# runs-on: ubuntu-latest -# steps: -# - uses: actions/checkout@v4 -# with: -# fetch-depth: '0' -# - uses: actions/setup-java@v4 -# with: -# java-version: '21' -# distribution: 'temurin' -# - name: Setup Gradle -# uses: gradle/actions/setup-gradle@v3.5.0 -# - name: Get current version of e2eTests -# id: version_e2eTests -# run: | -# E2ETESTS_VERSION=$(grep -oP 'version = "\K[0-9]+\.[0-9]+\.[0-9]+' e2eTests/build.gradle.kts) -# echo "e2eTests_version=$E2ETESTS_VERSION" >> $GITHUB_OUTPUT -# - name: Bump patch version for e2eTests -# id: bump_e2eTests_version -# run: | -# E2ETESTS_VERSION="${{ steps.version_e2eTests.outputs.e2eTests_version }}" -# VERSION_PARTS=(${E2ETESTS_VERSION//./ }) -# MAJOR=${VERSION_PARTS[0]} -# MINOR=${VERSION_PARTS[1]} -# PATCH=${VERSION_PARTS[2]} -# PATCH=$((PATCH + 1)) -# NEW_E2ETESTS_VERSION="$MAJOR.$MINOR.$PATCH" -# echo "new_e2eTests_version=$NEW_E2ETESTS_VERSION" >> $GITHUB_OUTPUT -# - name: Update version in e2eTests's build.gradle.kts -# run: sed -i "s#version = \".*\"#version = \"${{ steps.bump_e2eTests_version.outputs.new_e2eTests_version }}\"#" e2eTests/build.gradle.kts -# - name: Commit and Push Changes -# env: -# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} -# run: | -# BRANCH_NAME=${{ github.ref_name }} -# git config --global user.name 'GitHub Actions' -# git config --global user.email 'actions@github.com' -# for i in {1..3}; do -# git pull https://${{ secrets.GITHUB_TOKEN }}@github.com/ELIXIR-NO/FEGA-Norway.git $BRANCH_NAME -# git add -A -# git commit -m "bump e2eTests version to ${{ steps.bump_e2eTests_version.outputs.new_e2eTests_version }}" -# if git push https://${{ secrets.GITHUB_TOKEN }}@github.com/ELIXIR-NO/FEGA-Norway.git HEAD:refs/heads/$BRANCH_NAME; then -# break -# fi -# sleep 5 -# done -# - name: Create GitHub release -# uses: softprops/action-gh-release@v2 -# with: -# token: "${{ secrets.GITHUB_TOKEN }}" -# tag_name: ${{ steps.bump_e2eTests_version.outputs.new_e2eTests_version }} -# prerelease: false -# name: "E2eTests-${{ steps.bump_e2eTests_version.outputs.new_e2eTests_version }}" -# -# release-fega-norway: -# runs-on: ubuntu-latest -# steps: -# - uses: actions/checkout@v4 -# with: -# fetch-depth: '0' -# - uses: actions/setup-java@v4 -# with: -# java-version: '21' -# distribution: 'temurin' -# - name: Setup Gradle -# uses: gradle/actions/setup-gradle@v3.5.0 -# - name: Get current version of fega-norway -# id: version_fega_norway -# run: | -# FEGA_NORWAY_VERSION=$(grep -oP 'version = "\K[0-9]+\.[0-9]+\.[0-9]+' build.gradle.kts) -# echo "fega_norway_version=$FEGA_NORWAY_VERSION" >> $GITHUB_OUTPUT -# - name: Bump patch version for fega-norway -# id: bump_fega_norway_version -# run: | -# FEGA_NORWAY_VERSION="${{ steps.version_fega_norway.outputs.fega_norway_version }}" -# VERSION_PARTS=(${FEGA_NORWAY_VERSION//./ }) -# MAJOR=${VERSION_PARTS[0]} -# MINOR=${VERSION_PARTS[1]} -# PATCH=${VERSION_PARTS[2]} -# PATCH=$((PATCH + 1)) -# NEW_FEGA_NORWAY_VERSION="$MAJOR.$MINOR.$PATCH" -# echo "new_fega_norway_version=$NEW_FEGA_NORWAY_VERSION" >> $GITHUB_OUTPUT -# - name: Update version in fega-norway's build.gradle.kts -# run: sed -i "s#version = \".*\"#version = \"${{ steps.bump_fega_norway_version.outputs.new_fega_norway_version }}\"#" build.gradle.kts -# - name: Commit and Push Changes -# env: -# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} -# run: | -# BRANCH_NAME=${{ github.ref_name }} -# git config --global user.name 'GitHub Actions' -# git config --global user.email 'actions@github.com' -# for i in {1..3}; do -# git pull https://${{ secrets.GITHUB_TOKEN }}@github.com/ELIXIR-NO/FEGA-Norway.git $BRANCH_NAME -# git add -A -# git commit -m "bump fega_norway version to ${{ steps.bump_fega_norway_version.outputs.new_fega_norway_version }}" -# if git push https://${{ secrets.GITHUB_TOKEN }}@github.com/ELIXIR-NO/FEGA-Norway.git HEAD:refs/heads/$BRANCH_NAME; then -# break -# fi -# sleep 5 -# done -# - name: Create GitHub release -# uses: softprops/action-gh-release@v2 -# with: -# token: "${{ secrets.GITHUB_TOKEN }}" -# tag_name: ${{ steps.version_fega_norway.outputs.fega_norway_version }} -# prerelease: false -# name: "FEGA Norway-${{ steps.version_fega_norway.outputs.fega_norway_version }}" + publish-mq-interceptor: + needs: detect-changes + if: needs.detect-changes.outputs.mq-interceptor == 'true' + runs-on: ubuntu-latest + permissions: + contents: write + packages: write + pull-requests: write + steps: + - uses: actions/checkout@v4 + - name: Get current version for mq-interceptor + id: version_mq_interceptor + run: | + MQ_INTERCEPTOR_VERSION=$(grep -oP 'version = "\K[0-9]+\.[0-9]+\.[0-9]+' services/mq-interceptor/build.gradle.kts) + echo "mq_interceptor_version=$MQ_INTERCEPTOR_VERSION" >> $GITHUB_OUTPUT + - name: Bump patch version for mq-interceptor + id: bump_mq_interceptor_version + run: | + MQ_INTERCEPTOR_VERSION="${{ steps.version_mq_interceptor.outputs.mq_interceptor_version }}" + VERSION_PARTS=(${MQ_INTERCEPTOR_VERSION//./ }) + MAJOR=${VERSION_PARTS[0]} + MINOR=${VERSION_PARTS[1]} + PATCH=${VERSION_PARTS[2]} + PATCH=$((PATCH + 1)) + NEW_MQ_INTERCEPTOR_VERSION="$MAJOR.$MINOR.$PATCH" + echo "new_mq_interceptor_version=$NEW_MQ_INTERCEPTOR_VERSION" >> $GITHUB_OUTPUT + - name: Update version in mq-interceptor's build.gradle.kts + run: sed -i "s#version = \".*\"#version = \"${{ steps.bump_mq_interceptor_version.outputs.new_mq_interceptor_version }}\"#" services/mq-interceptor/build.gradle.kts + - name: Set Repository Name + id: repo_name + run: | + REPO_NAME=$(echo "${{ github.repository }}" | tr '[:upper:]' '[:lower:]') + echo "repo_name=$REPO_NAME" >> $GITHUB_ENV + - name: Log in to the Github Container registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Build and push + uses: docker/build-push-action@v6 + with: + context: ./services/mq-interceptor + push: true + no-cache: 'true' + tags: | + ghcr.io/${{ env.repo_name }}:mq-interceptor-${{ steps.bump_mq_interceptor_version.outputs.new_mq_interceptor_version }} + ghcr.io/${{ env.repo_name }}:mq-interceptor-latest + labels: | + org.opencontainers.image.source=${{ github.event.repository.clone_url }} + org.opencontainers.image.created=$(date -u +'%Y-%m-%dT%H:%M:%SZ') + org.opencontainers.image.revision=${{ github.sha }} + - name: Commit and Push Changes + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + BRANCH_NAME=${{ github.ref_name }} + git config --global user.name 'GitHub Actions' + git config --global user.email 'actions@github.com' + for i in {1..3}; do + git pull https://${{ secrets.GITHUB_TOKEN }}@github.com/ELIXIR-NO/FEGA-Norway.git $BRANCH_NAME + git add -A + git commit -m "bump mq-interceptor version to ${{ steps.bump_mq_interceptor_version.outputs.new_mq_interceptor_version }}" + if git push https://${{ secrets.GITHUB_TOKEN }}@github.com/ELIXIR-NO/FEGA-Norway.git HEAD:refs/heads/$BRANCH_NAME; then + break + fi + sleep 5 + done + - name: Create GitHub release + if: success() + uses: softprops/action-gh-release@v2 + with: + target_commitish: ${{ github.head_ref || github.ref_name }} + token: "${{ secrets.GITHUB_TOKEN }}" + tag_name: "mq-interceptor-${{ steps.bump_mq_interceptor_version.outputs.new_mq_interceptor_version }}" + prerelease: false + name: "Mq-interceptor-${{ steps.bump_mq_interceptor_version.outputs.new_mq_interceptor_version }}" + publish-lega-commander: + needs: detect-changes + if: needs.detect-changes.outputs.lega-commander == 'true' + runs-on: ubuntu-latest + permissions: + contents: write + packages: write + pull-requests: write + steps: + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: 1.22 + id: go + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Get current version for lega-commander + id: version_lega_commander + run: | + LEGA_COMMANDER_VERSION=$(grep -oP 'version = "\K[0-9]+\.[0-9]+\.[0-9]+' cli/lega-commander/build.gradle.kts) + echo "lega_commander_version=$LEGA_COMMANDER_VERSION" >> $GITHUB_OUTPUT + - name: Bump patch version for lega-commander + id: bump_lega_commander_version + run: | + LEGA_COMMANDER_VERSION="${{ steps.version_lega_commander.outputs.lega_commander_version }}" + VERSION_PARTS=(${LEGA_COMMANDER_VERSION//./ }) + MAJOR=${VERSION_PARTS[0]} + MINOR=${VERSION_PARTS[1]} + PATCH=${VERSION_PARTS[2]} + PATCH=$((PATCH + 1)) + NEW_LEGA_COMMANDER_VERSION="$MAJOR.$MINOR.$PATCH" + echo "new_lega_commander_version=$NEW_LEGA_COMMANDER_VERSION" >> $GITHUB_OUTPUT + - name: Create and push new tag + run: | + git tag v${{ steps.bump_lega_commander_version.outputs.new_lega_commander_version }} ${{ github.sha }} + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v6 + with: + version: latest + args: release --clean + workdir: cli/lega-commander + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Update version in lega-commander's build.gradle.kts + run: sed -i "s#version = \".*\"#version = \"${{ steps.bump_lega_commander_version.outputs.new_lega_commander_version }}\"#" cli/lega-commander/build.gradle.kts + - name: Commit and Push Changes + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + BRANCH_NAME=${{ github.ref_name }} + git config --global user.name 'GitHub Actions' + git config --global user.email 'actions@github.com' + for i in {1..3}; do + git pull https://${{ secrets.GITHUB_TOKEN }}@github.com/ELIXIR-NO/FEGA-Norway.git $BRANCH_NAME + git add -A + git commit -m "bump lega-commander version to ${{ steps.bump_lega_commander_version.outputs.new_lega_commander_version }}" + if git push https://${{ secrets.GITHUB_TOKEN }}@github.com/ELIXIR-NO/FEGA-Norway.git HEAD:refs/heads/$BRANCH_NAME; then + break + fi + sleep 5 + done + - name: Create GitHub release + if: success() + uses: softprops/action-gh-release@v2 + with: + target_commitish: ${{ github.head_ref || github.ref_name }} + token: "${{ secrets.GITHUB_TOKEN }}" + tag_name: "lega-commander-${{ steps.bump_lega_commander_version.outputs.new_lega_commander_version }}" + prerelease: false + name: "Lega-commander-${{ steps.bump_lega_commander_version.outputs.new_lega_commander_version }}" + release-e2eTests: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: '0' + - uses: actions/setup-java@v4 + with: + java-version: '21' + distribution: 'temurin' + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v3.5.0 + - name: Get current version of e2eTests + id: version_e2eTests + run: | + E2ETESTS_VERSION=$(grep -oP 'version = "\K[0-9]+\.[0-9]+\.[0-9]+' e2eTests/build.gradle.kts) + echo "e2eTests_version=$E2ETESTS_VERSION" >> $GITHUB_OUTPUT + - name: Bump patch version for e2eTests + id: bump_e2eTests_version + run: | + E2ETESTS_VERSION="${{ steps.version_e2eTests.outputs.e2eTests_version }}" + VERSION_PARTS=(${E2ETESTS_VERSION//./ }) + MAJOR=${VERSION_PARTS[0]} + MINOR=${VERSION_PARTS[1]} + PATCH=${VERSION_PARTS[2]} + PATCH=$((PATCH + 1)) + NEW_E2ETESTS_VERSION="$MAJOR.$MINOR.$PATCH" + echo "new_e2eTests_version=$NEW_E2ETESTS_VERSION" >> $GITHUB_OUTPUT + - name: Update version in e2eTests's build.gradle.kts + run: sed -i "s#version = \".*\"#version = \"${{ steps.bump_e2eTests_version.outputs.new_e2eTests_version }}\"#" e2eTests/build.gradle.kts + - name: Commit and Push Changes + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + BRANCH_NAME=${{ github.ref_name }} + git config --global user.name 'GitHub Actions' + git config --global user.email 'actions@github.com' + for i in {1..3}; do + git pull https://${{ secrets.GITHUB_TOKEN }}@github.com/ELIXIR-NO/FEGA-Norway.git $BRANCH_NAME + git add -A + git commit -m "bump e2eTests version to ${{ steps.bump_e2eTests_version.outputs.new_e2eTests_version }}" + if git push https://${{ secrets.GITHUB_TOKEN }}@github.com/ELIXIR-NO/FEGA-Norway.git HEAD:refs/heads/$BRANCH_NAME; then + break + fi + sleep 5 + done + - name: Create GitHub release + uses: softprops/action-gh-release@v2 + with: + token: "${{ secrets.GITHUB_TOKEN }}" + tag_name: ${{ steps.bump_e2eTests_version.outputs.new_e2eTests_version }} + prerelease: false + name: "E2eTests-${{ steps.bump_e2eTests_version.outputs.new_e2eTests_version }}" + release-fega-norway: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: '0' + - uses: actions/setup-java@v4 + with: + java-version: '21' + distribution: 'temurin' + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v3.5.0 + - name: Get current version of fega-norway + id: version_fega_norway + run: | + FEGA_NORWAY_VERSION=$(grep -oP 'version = "\K[0-9]+\.[0-9]+\.[0-9]+' build.gradle.kts) + echo "fega_norway_version=$FEGA_NORWAY_VERSION" >> $GITHUB_OUTPUT + - name: Bump patch version for fega-norway + id: bump_fega_norway_version + run: | + FEGA_NORWAY_VERSION="${{ steps.version_fega_norway.outputs.fega_norway_version }}" + VERSION_PARTS=(${FEGA_NORWAY_VERSION//./ }) + MAJOR=${VERSION_PARTS[0]} + MINOR=${VERSION_PARTS[1]} + PATCH=${VERSION_PARTS[2]} + PATCH=$((PATCH + 1)) + NEW_FEGA_NORWAY_VERSION="$MAJOR.$MINOR.$PATCH" + echo "new_fega_norway_version=$NEW_FEGA_NORWAY_VERSION" >> $GITHUB_OUTPUT + - name: Update version in fega-norway's build.gradle.kts + run: sed -i "s#version = \".*\"#version = \"${{ steps.bump_fega_norway_version.outputs.new_fega_norway_version }}\"#" build.gradle.kts + - name: Commit and Push Changes + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + BRANCH_NAME=${{ github.ref_name }} + git config --global user.name 'GitHub Actions' + git config --global user.email 'actions@github.com' + for i in {1..3}; do + git pull https://${{ secrets.GITHUB_TOKEN }}@github.com/ELIXIR-NO/FEGA-Norway.git $BRANCH_NAME + git add -A + git commit -m "bump fega_norway version to ${{ steps.bump_fega_norway_version.outputs.new_fega_norway_version }}" + if git push https://${{ secrets.GITHUB_TOKEN }}@github.com/ELIXIR-NO/FEGA-Norway.git HEAD:refs/heads/$BRANCH_NAME; then + break + fi + sleep 5 + done + - name: Create GitHub release + uses: softprops/action-gh-release@v2 + with: + token: "${{ secrets.GITHUB_TOKEN }}" + tag_name: ${{ steps.version_fega_norway.outputs.fega_norway_version }} + prerelease: false + name: "FEGA Norway-${{ steps.version_fega_norway.outputs.fega_norway_version }}" diff --git a/build.gradle.kts b/build.gradle.kts index c7114994..9b478b7e 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -5,7 +5,7 @@ plugins { group = "no.elixir" -version = "1.0.3" +version = "1.0.0" repositories { mavenCentral() } diff --git a/e2eTests/build.gradle.kts b/e2eTests/build.gradle.kts index 4c8d23e3..de211cc4 100644 --- a/e2eTests/build.gradle.kts +++ b/e2eTests/build.gradle.kts @@ -4,7 +4,7 @@ plugins { } group = "no.elixir.fega" -version = "1.0.3" +version = "1.0.0" repositories { mavenCentral() diff --git a/lib/clearinghouse/build.gradle.kts b/lib/clearinghouse/build.gradle.kts index 237c9194..cc76e3c9 100644 --- a/lib/clearinghouse/build.gradle.kts +++ b/lib/clearinghouse/build.gradle.kts @@ -8,7 +8,7 @@ plugins { } group = "no.elixir" -version = "1.0.3" +version = "1.0.0" repositories { mavenCentral() diff --git a/lib/tsd-file-api-client/build.gradle.kts b/lib/tsd-file-api-client/build.gradle.kts index a696f9bb..1f47967f 100644 --- a/lib/tsd-file-api-client/build.gradle.kts +++ b/lib/tsd-file-api-client/build.gradle.kts @@ -6,7 +6,7 @@ plugins { } group = "elixir.no" -version = "1.0.3" +version = "1.0.0" repositories { mavenCentral() diff --git a/services/cega-mock/build.gradle.kts b/services/cega-mock/build.gradle.kts index 3c8f4fd0..90a1da98 100644 --- a/services/cega-mock/build.gradle.kts +++ b/services/cega-mock/build.gradle.kts @@ -2,7 +2,7 @@ plugins { base } -version = "1.0.3" +version = "1.0.0" val goBuild = tasks.register("goBuild", Exec::class) { description = "Build the Go application" diff --git a/services/localega-tsd-proxy/build.gradle.kts b/services/localega-tsd-proxy/build.gradle.kts index 066202c3..138ea0ce 100644 --- a/services/localega-tsd-proxy/build.gradle.kts +++ b/services/localega-tsd-proxy/build.gradle.kts @@ -5,7 +5,7 @@ plugins { } group = "no.elixir.fega" -version = "1.0.2" +version = "1.0.0" dependencies { implementation(project(":lib:clearinghouse")) diff --git a/services/mq-interceptor/build.gradle.kts b/services/mq-interceptor/build.gradle.kts index e1b4500c..da5d12f4 100644 --- a/services/mq-interceptor/build.gradle.kts +++ b/services/mq-interceptor/build.gradle.kts @@ -2,7 +2,7 @@ plugins { base } -version = "1.0.2" +version = "1.0.0" // Build val goBuild = tasks.register("goBuild", Exec::class) { diff --git a/services/tsd-api-mock/build.gradle.kts b/services/tsd-api-mock/build.gradle.kts index f3dd46aa..30a9b580 100644 --- a/services/tsd-api-mock/build.gradle.kts +++ b/services/tsd-api-mock/build.gradle.kts @@ -5,7 +5,7 @@ plugins { } group = "no.elixir" -version = "1.0.2" +version = "1.0.0" dependencies { runtimeOnly("com.h2database:h2")