Skip to content

Commit

Permalink
removed deprecated actions from pds-tools release #3665
Browse files Browse the repository at this point in the history
  • Loading branch information
sven-dmlr committed Nov 28, 2024
1 parent c531952 commit 132d1c0
Showing 1 changed file with 39 additions and 45 deletions.
84 changes: 39 additions & 45 deletions .github/workflows/release-pds-tools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,15 @@ jobs:
# Create temporary local tags, so we build documentation for this tag...
# The final tag on git server side will be done by the release when the draft is saved as "real" release
# automatically.
- name: "Temporary tag server version: v${{ inputs.pds-tools-version }}-pds-tools - if defined"
if: inputs.pds-tools-version != ''
- name: "Temporary tag server version: v${{ inputs.pds-tools-version }}-pds-tools"
run: git tag v${{ inputs.pds-tools-version }}-pds-tools

# ----------------------
# Setup + Caching
# ----------------------
- name: Install required packages
run: sudo apt-get -y install hub

- name: Set up JDK 17
uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b
with:
Expand Down Expand Up @@ -91,7 +93,7 @@ jobs:
echo "Pull Request URL - ${{ steps.pr_spdx_headers.outputs.pull-request-url }}"
# ----------------------
# SecHub PDS-Tools
# Build SecHub PDS-Tools
# ----------------------
- name: Build Server, DAUI and generate OpenAPI file
run: ./gradlew ensureLocalhostCertificate build generateOpenapi buildDeveloperAdminUI -x :sechub-integrationtest:test -x :sechub-cli:build
Expand Down Expand Up @@ -135,51 +137,43 @@ jobs:
git status
./gradlew assertReleaseable
- name: Create PDS-Tools release
id: create_pds_tools_release
if: inputs.pds-tools-version != ''
uses: actions/create-release@0cb9c9b65d5d1901c1f53e5e66eaf4afd303e70e
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: v${{ inputs.pds-tools-version }}-pds-tools
commitish: master
release_name: PDS-Tools Version ${{ inputs.pds-tools-version }}
body: |
Changes in this Release
- Some minor changes on PDS-Tools implementation
For more details please look at [Milestone ${{inputs.pds-tools-milestone-number}}]( https://github.com/mercedes-benz/sechub/milestone/${{inputs.pds-tools-milestone-number}}?closed=1)
draft: true
prerelease: false

- name: Create sha256 checksum file for PDS-Tools cli jar
if: inputs.pds-tools-version != ''
# ******************************************
# P D S - T o o l s release
# ******************************************
- name: Prepare PDS-Tools ${{ inputs.pds-tools-version }} release artifacts
shell: bash
run: |
cd sechub-pds-tools/build/libs
sha256sum sechub-pds-tools-cli-${{ inputs.pds-tools-version }}.jar > sechub-pds-tools-cli-${{ inputs.pds-tools-version }}.jar.sha256sum
- name: Upload PDS-Tools release asset sechub-pds-tools-cli-${{ inputs.pds-tools-version }}.jar
if: inputs.pds-tools-version != ''
uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_pds_tools_release.outputs.upload_url }}
asset_path: sechub-pds-tools/build/libs/sechub-pds-tools-cli-${{ inputs.pds-tools-version }}.jar
asset_name: sechub-pds-tools-cli-${{ inputs.pds-tools-version }}.jar
asset_content_type: application/zip

- name: Upload PDS-Tools release asset sechub-pds-tools-cli-${{ inputs.pds-tools-version }}.jar.sha256sum
if: inputs.pds-tools-version != ''
uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5
mkdir pds-tools-release-artifacts
# Collect release artifacts
cp sechub-pds-tools/build/libs/sechub-pds-tools-cli-${{ inputs.pds-tools-version }}.jar \
pds-tools-release-artifacts/
# Compute sha256 checksums for .jar files
cd pds-tools-release-artifacts
for i in *.jar ; do
sha256sum "$i" > "$i.sha256sum"
done
- name: Create PDS-Tools ${{ inputs.pds-tools-version }} release draft
shell: bash
run: |
assets=()
echo "# Adding PDS binaries and docs"
cd pds-tools-release-artifacts/
for asset in * ; do
filename=`basename "$asset"`
echo "# - $filename"
assets+=("-a" "${asset}#${filename}")
done
# Define release data
tag_name="v${{ inputs.pds-tools-version }}-pds-tools"
release_title="PDS-Tools Version ${{ inputs.pds-tools-version }}"
release_message="Changes in this Release
- Some minor changes on PDS-Tools implementation"
release_footer="For more details please look at [Milestone ${{inputs.pds-tools-milestone-number}}]( https://github.com/mercedes-benz/sechub/milestone/${{inputs.pds-tools-milestone-number}}?closed=1)"
echo "# Create release draft \"$release_title\" on github"
hub release create --draft "${assets[@]}" -m "$release_title" -m "$release_message" -m "$release_footer" "$tag_name"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_pds_tools_release.outputs.upload_url }}
asset_path: sechub-pds-tools/build/libs/sechub-pds-tools-cli-${{ inputs.pds-tools-version }}.jar.sha256sum
asset_name: sechub-pds-tools-cli-${{ inputs.pds-tools-version }}.jar.sha256sum
asset_content_type: text/plain

# -----------------------------------------
# Create release issue
Expand Down

0 comments on commit 132d1c0

Please sign in to comment.