Skip to content
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

Update changelog generator action to fix deprecated warning #38

Merged
merged 2 commits into from
Apr 6, 2023
Merged
Changes from 1 commit
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
144 changes: 72 additions & 72 deletions .github/workflows/eumserver_release.yml
Original file line number Diff line number Diff line change
@@ -1,77 +1,77 @@
name: Release Eum Server

on:
push:
tags:
- '[0-9]*.[0-9]*.[0-9]**'
on:
push:
tags:
- '[0-9]*.[0-9]*.[0-9]**'

jobs:
test_eum_server:
uses: ./.github/workflows/eumserver_test.yml

build_and_release:
name: Build and release EUM Server
runs-on: ubuntu-latest
needs: [test_eum_server]
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build project
run: ./gradlew assemble bootJar -PbuildVersion=${{ github.ref_name }}
- name: Create BOM
run: ./gradlew cyclonedxBom
- name: Add artifacts
run: |
mkdir artifacts
cp build/libs/*.jar ./artifacts
cp build/reports/bom.json ./artifacts
cp build/reports/bom.xml ./artifacts
- name: Generate Release Hashes
run: |
cd ./artifacts
sha256sum * >> inspectit-ocelot-eum-server-sha256-checksums.txt
- name: "Get previous tag"
id: previoustag
# this gets the tag of the previous release based on the tags in the repo
run: echo "tag=$(git ls-remote --tags | cut --delimiter='/' --fields=3 | tail --lines=2 | head -n -1)" >> $GITHUB_OUTPUT
- name: "Build Changelog"
id: build_changelog
uses: heinrichreimer/github-changelog-generator-action@v2.3
with:
token: ${{ secrets.GITHUB_TOKEN }}
sinceTag: ${{ steps.previoustag.outputs.tag }}
dateFormat:
maxIssues: 500
unreleased: false
author: false
headerLabel: "## Changelog"
stripGeneratorNotice: true
- name: Create Release
uses: softprops/action-gh-release@v0.1.15
with:
tag_name: ${{ github.ref_name }}
body: ${{ steps.build_changelog.outputs.changelog }}
files: artifacts/*
generate_release_notes: false
token: ${{ github.token }}
name: Version ${{ github.ref_name }}
test_eum_server:
uses: ./.github/workflows/eumserver_test.yml

build_and_publish_docker_images:
name: "Build and Push Docker Images"
runs-on: ubuntu-latest
needs: build_and_release
environment: release
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build Docker Images
run: ./gradlew dockerTag -PbuildVersion=${{ github.ref_name }}
- name: Push Docker Images
run: |
docker login -u ${{ secrets.DOCKER_HUB_USER }} -p ${{ secrets.DOCKER_HUB_PASSWORD }}
docker push inspectit/inspectit-ocelot-eum-server:${{ github.ref_name }}
docker push inspectit/inspectit-ocelot-eum-server:latest
build_and_release:
name: Build and release EUM Server
runs-on: ubuntu-latest
needs: [test_eum_server]
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build project
run: ./gradlew assemble bootJar -PbuildVersion=${{ github.ref_name }}
- name: Create BOM
run: ./gradlew cyclonedxBom
- name: Add artifacts
run: |
mkdir artifacts
cp build/libs/*.jar ./artifacts
cp build/reports/bom.json ./artifacts
cp build/reports/bom.xml ./artifacts
- name: Generate Release Hashes
run: |
cd ./artifacts
sha256sum * >> inspectit-ocelot-eum-server-sha256-checksums.txt
- name: "Get previous tag"
id: previoustag
# this gets the tag of the previous release based on the tags in the repo
run: echo "tag=$(git ls-remote --tags | cut --delimiter='/' --fields=3 | tail --lines=2 | head -n -1)" >> $GITHUB_OUTPUT
- name: "Build Changelog"
id: build_changelog
uses: danipaniii/action-github-changelog-generator@v1.2
with:
token: ${{ secrets.GITHUB_TOKEN }}
sinceTag: ${{ steps.previoustag.outputs.tag }}
dateFormat:
maxIssues: 500
unreleased: false
author: false
headerLabel: "## Changelog"
stripGeneratorNotice: true
- name: Create Release
uses: softprops/action-gh-release@v0.1.15
with:
tag_name: ${{ github.ref_name }}
body: ${{ steps.build_changelog.outputs.changelog }}
files: artifacts/*
generate_release_notes: false
token: ${{ github.token }}
name: Version ${{ github.ref_name }}

build_and_publish_docker_images:
name: "Build and Push Docker Images"
runs-on: ubuntu-latest
needs: build_and_release
environment: release
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build Docker Images
run: ./gradlew dockerTag -PbuildVersion=${{ github.ref_name }}
- name: Push Docker Images
run: |
docker login -u ${{ secrets.DOCKER_HUB_USER }} -p ${{ secrets.DOCKER_HUB_PASSWORD }}
docker push inspectit/inspectit-ocelot-eum-server:${{ github.ref_name }}
docker push inspectit/inspectit-ocelot-eum-server:latest