Skip to content

Remove condition for releasing samm cli #592

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
103 changes: 50 additions & 53 deletions .github/workflows/release-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ jobs:

release:
name: Release
needs: [build-linux, build-windows]
needs: [build-linux, build-windows, build-macos]
runs-on: ubuntu-latest
steps:
# Need to checkout here too, so that we have the pom.xml
Expand Down Expand Up @@ -320,9 +320,56 @@ jobs:
with:
name: mac-artifacts

- name: Set versions
continue-on-error: true
run: |
release_version=${{ github.event.inputs.release_version }}
release_branch_name=${release_version%.*}.x
echo "release_branch_name=$release_branch_name" >> $GITHUB_ENV

# Set version in pom.xml files
mvn -B clean install -DskipTests -Dmaven.javadoc.skip=true
mvn -B versions:set -DnewVersion=${{ github.event.inputs.release_version }}
mvn -B versions:commit
# Set version in Antora module
yq eval -i '.version = "${{ github.event.inputs.release_version }}"' documentation/developer-guide/antora.yml

- name: Commit version changes and push to upstream repository
uses: stefanzweifel/git-auto-commit-action@8756aa072ef5b4a080af5dc8fef36c5d586e521d # v5
with:
branch: ${{ env.release_branch_name }}
commit_user_name: github-actions
commit_user_email: github-actions@github.com
commit_author: Author <actions@github.com>
file_pattern: 'documentation/developer-guide/antora.yml pom.xml */pom.xml */*/pom.xml'

# Full release: Github
- name: "Create Github release (full)"
if: ${{ !contains( github.event.inputs.release_version, '-M' ) }}
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v0.1.15
with:
body: "Release version ${{ github.event.inputs.release_version }}."
tag_name: v${{ github.event.inputs.release_version }}
target_commitish: ${{ env.release_branch_name }}
draft: false
prerelease: false
files: |
samm-cli-${{ github.event.inputs.release_version }}-linux-x86_64.tar.gz
samm-cli-${{ github.event.inputs.release_version }}-macos-x86_64.tar.gz
samm-cli-*.jar
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: "Notify issues of release their fix is contained in"
if: ${{ !contains( github.event.inputs.release_version, '-M' ) }}
uses: apexskier/github-release-commenter@3bd413ad5e1d603bfe2282f9f06f2bdcec079327 # v1.3.6
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
comment-template: |
Release {release_link} addresses this.

# Sign SAML-CLI Windows executable
- name: Get Artifact ID (Windows)
if: matrix.os == 'windows-latest'
shell: bash
run: |
# Get the list of artifacts for the specified workflow run
Expand All @@ -336,8 +383,7 @@ jobs:
env:
TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Commit Artifact url and version changes and push to pre release branch for jenkins (Windows)
if: matrix.os == 'windows-latest'
- name: Commit Artifact URL and version changes and push to pre release branch for Jenkins (Windows)
shell: bash
run: |
ARTIFACT_URL_WIN="https://api.github.com/repos/eclipse-esmf/esmf-sdk/actions/artifacts/$ARTIFACT_ID/zip"
Expand All @@ -356,7 +402,6 @@ jobs:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Trigger Jenkins Job, for signing executable
if: matrix.os == 'windows-latest'
shell: bash
run: |
DATA='{"repository": {"url": "https://github.com/eclipse-esmf/esmf-sdk", "html_url": "https://github.com/eclipse-esmf/esmf-sdk", "owner": { "name": "ESMF"}}, "pusher": { "name": "GitHub Action", "email": "esmf-dev@eclipse.org"}}'
Expand Down Expand Up @@ -386,54 +431,6 @@ jobs:
# as described in https://stackoverflow.com/a/70157413
MAVEN_OPTS: --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.text=ALL-UNNAMED --add-opens=java.desktop/java.awt.font=ALL-UNNAMED

- name: Set versions
continue-on-error: true
run: |
release_version=${{ github.event.inputs.release_version }}
release_branch_name=${release_version%.*}.x
echo "release_branch_name=$release_branch_name" >> $GITHUB_ENV

# Set version in pom.xml files
mvn -B clean install -DskipTests -Dmaven.javadoc.skip=true
mvn -B versions:set -DnewVersion=${{ github.event.inputs.release_version }}
mvn -B versions:commit
# Set version in Antora module
yq eval -i '.version = "${{ github.event.inputs.release_version }}"' documentation/developer-guide/antora.yml

- name: Commit version changes and push to upstream repository
uses: stefanzweifel/git-auto-commit-action@8756aa072ef5b4a080af5dc8fef36c5d586e521d # v5
with:
branch: ${{ env.release_branch_name }}
commit_user_name: github-actions
commit_user_email: github-actions@github.com
commit_author: Author <actions@github.com>
file_pattern: 'documentation/developer-guide/antora.yml pom.xml */pom.xml */*/pom.xml'

# Full release: Github
- name: "Create Github release (full)"
if: ${{ !contains( github.event.inputs.release_version, '-M' ) }}
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v0.1.15
with:
body: "Release version ${{ github.event.inputs.release_version }}."
tag_name: v${{ github.event.inputs.release_version }}
target_commitish: ${{ env.release_branch_name }}
draft: false
prerelease: false
files: |
samm-cli-${{ github.event.inputs.release_version }}-linux-x86_64.tar.gz
samm-cli-${{ github.event.inputs.release_version }}-macos-x86_64.tar.gz
samm-cli-*.jar
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: "Notify issues of release their fix is contained in"
if: ${{ !contains( github.event.inputs.release_version, '-M' ) }}
uses: apexskier/github-release-commenter@3bd413ad5e1d603bfe2282f9f06f2bdcec079327 # v1.3.6
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
comment-template: |
Release {release_link} addresses this.

# Milestone release: Write settings to deploy to Github repo
- name: Write settings.xml
if: contains( github.event.inputs.release_version, '-M' )
Expand Down
Loading