From 50b274288f76b9ca85cd504d8862db2b069194d9 Mon Sep 17 00:00:00 2001 From: DvSmi <81349062+DvSmi@users.noreply.github.com> Date: Fri, 18 Mar 2022 11:51:01 +0100 Subject: [PATCH 1/3] Add settings.xml to handle Github Token --- .github/workflows/release-workflow.yml | 2 +- .github/workflows/settings.xml | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/settings.xml diff --git a/.github/workflows/release-workflow.yml b/.github/workflows/release-workflow.yml index f57f6c91c..2508a0490 100644 --- a/.github/workflows/release-workflow.yml +++ b/.github/workflows/release-workflow.yml @@ -109,6 +109,6 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Publish to Github condition: ne( '${{ github.event.inputs.release_version }}', 'true') - run: mvn -B clean -pl '!sds-sdk-test-report,!tools/bamm-cli' deploy -DskipTests -Pmilestone-build + run: mvn -s ./.github/workflows/settings.xml -B clean -pl '!sds-sdk-test-report,!tools/bamm-cli' deploy -DskipTests -Pmilestone-build env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/settings.xml b/.github/workflows/settings.xml new file mode 100644 index 000000000..ce29f893f --- /dev/null +++ b/.github/workflows/settings.xml @@ -0,0 +1,18 @@ + + + + github + + + + Authorization + Bearer ${env.GITHUB_TOKEN} + + + + + + \ No newline at end of file From 5bfb7c7f8cae400068ed4e9129557d0d7a0b8b64 Mon Sep 17 00:00:00 2001 From: DvSmi <81349062+DvSmi@users.noreply.github.com> Date: Fri, 18 Mar 2022 11:51:01 +0100 Subject: [PATCH 2/3] Add settings.xml to handle Github Token --- .github/workflows/release-workflow.yml | 5 ++++- .github/workflows/settings.xml | 18 ++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/settings.xml diff --git a/.github/workflows/release-workflow.yml b/.github/workflows/release-workflow.yml index ec41ba593..997b16e49 100644 --- a/.github/workflows/release-workflow.yml +++ b/.github/workflows/release-workflow.yml @@ -5,6 +5,9 @@ on: release_version: description: 'Version number of the release' required: true + milestone_version: + description: '"true" if a milestone release shall be published' + required: false jobs: build: runs-on: ubuntu-20.04 @@ -107,6 +110,6 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Publish to Github if: contains( github.event.inputs.release_version, '-M' ) - run: mvn -B clean -pl '!sds-sdk-test-report,!tools/bamm-cli' deploy -DskipTests -Pmilestone-build + run: mvn -s ./.github/workflows/settings.xml -B clean -pl '!sds-sdk-test-report,!tools/bamm-cli' deploy -DskipTests -Pmilestone-build env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/settings.xml b/.github/workflows/settings.xml new file mode 100644 index 000000000..ce29f893f --- /dev/null +++ b/.github/workflows/settings.xml @@ -0,0 +1,18 @@ + + + + github + + + + Authorization + Bearer ${env.GITHUB_TOKEN} + + + + + + \ No newline at end of file From 048314541e51eb4e21c5d6ddfa71425b7d89c50b Mon Sep 17 00:00:00 2001 From: DvSmi <81349062+DvSmi@users.noreply.github.com> Date: Fri, 18 Mar 2022 11:56:35 +0100 Subject: [PATCH 3/3] Revert merge error --- .github/workflows/release-workflow.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/release-workflow.yml b/.github/workflows/release-workflow.yml index 358800d25..dab0965a6 100644 --- a/.github/workflows/release-workflow.yml +++ b/.github/workflows/release-workflow.yml @@ -5,9 +5,6 @@ on: release_version: description: 'Version number of the release' required: true - milestone_version: - description: '"true" if a milestone release shall be published' - required: false jobs: build: runs-on: ubuntu-20.04 @@ -32,6 +29,7 @@ jobs: git config user.name github-actions git config user.email github-actions@github.com - name: Sanity check version + if: ${{ !contains( github.event.inputs.release_version, '-M' ) }} run: | current_version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) release_version=${{ github.event.inputs.release_version }}