change the version #27
Workflow file for this run
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
name: Publish | |
on: | |
push: | |
jobs: | |
# detect_changes: | |
# runs-on: ubuntu-latest | |
# outputs: | |
# 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/**' | |
setup: | |
runs-on: ubuntu-latest | |
outputs: | |
matrix: ${{ steps.matrix.outputs.value }} | |
steps: | |
- id: matrix | |
run: | | |
matrix_array=() | |
if [ true = true ]; then | |
matrix_array+=("a") | |
fi | |
if [ true = true ]; then | |
matrix_array+=("b") | |
fi | |
echo "value=$(printf '%s\n' "${matrix_array[@]}" | jq -R . | jq -s .)" >> $GITHUB_OUTPUT | |
- run: | | |
echo "${{ steps.matrix.outputs.value }}" | |
build: | |
needs: setup | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
value: ${{fromJSON(needs.setup.outputs.matrix)}} | |
steps: | |
- run: | | |
echo "${{ matrix.value }}" | |
# | |
# 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/[email protected] | |
# | |
# - 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: 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-libs: | |
# needs: detect_changes | |
# runs-on: ubuntu-latest | |
# strategy: | |
# matrix: | |
# lib: [ "clearinghouse", "crypt4gh", "tsd-file-api-client" ] | |
# if: > | |
# (needs.detect_changes.outputs.outputs.cc == 'true' && ${{ matrix.lib }} == 'cc') || | |
# (needs.detect_changes.outputs.outputs.bb == 'true' && ${{ matrix.lib }} == 'bb') || | |
# (needs.detect_changes.outputs.outputs.aaa == 'true' && ${{ matrix.lib }} == 'aaa') | |
# 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/[email protected] | |
# | |
# - name: Get current version for ${{ matrix.lib }} | |
# id: current_version | |
# run: | | |
# VERSION=$(grep -oP 'version = "\K[0-9]+\.[0-9]+\.[0-9]+' lib/${{ matrix.lib }}/build.gradle.kts) | |
# echo "version=$VERSION" >> $GITHUB_OUTPUT | |
# | |
# - name: Bump patch version for ${{ matrix.lib }} | |
# id: bump_version | |
# run: | | |
# VERSION="${{ steps.current_version.outputs.version }}" | |
# VERSION_PARTS=(${VERSION//./ }) | |
# MAJOR=${VERSION_PARTS[0]} | |
# MINOR=${VERSION_PARTS[1]} | |
# PATCH=${VERSION_PARTS[2]} | |
# # Increment the patch version | |
# PATCH=$((PATCH + 1)) | |
# NEW_VERSION="$MAJOR.$MINOR.$PATCH" | |
# echo "new_version=$NEW_VERSION" >> $GITHUB_OUTPUT | |
# | |
# - name: Update version in ${{ matrix.lib }}'s build.gradle.kts | |
# run: sed -i "s#version = \".*\"#version = \"${{ steps.bump_version.outputs.new_version }}\"#" lib/${{ matrix.lib }}/build.gradle.kts | |
# | |
# - name: Release ${{ matrix.lib }} | |
# run: | | |
# ./gradlew :lib:${{ matrix.lib }}:build | |
# ./gradlew :lib:${{ matrix.lib }}:publish | |
# env: | |
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# | |
# # - name: Commit and Push Changes | |
# # if: steps.format.outputs.changes == 'true' | |
# # env: | |
# # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# # run: | | |
# # BRANCH_NAME=${{ github.head_ref }} | |
# # git config --global user.name 'GitHub Actions' | |
# # git config --global user.email '[email protected]' | |
# # git add -A | |
# # git commit -m "Code formatting applied" | |
# # git push https://${{ secrets.GITHUB_TOKEN }}@github.com/ELIXIR-NO/FEGA-Norway.git HEAD:refs/heads/$BRANCH_NAME | |
# | |
# - 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: "${{ matrix.lib }}-${{ steps.bump_version.outputs.new_version }}" | |
# prerelease: false | |
# name: "${{ matrix.lib }}-${{ steps.bump_version.outputs.new_version }}" |