Skip to content

Commit

Permalink
Merge pull request #10 from paullatzelsperger/release/0.5.0-test1
Browse files Browse the repository at this point in the history
Release version 0.5.0-test1
  • Loading branch information
paullatzelsperger authored Jul 6, 2023
2 parents 71e4cac + 30992b4 commit ece3736
Show file tree
Hide file tree
Showing 20 changed files with 178 additions and 143 deletions.
34 changes: 12 additions & 22 deletions .github/workflows/draft-new-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,56 +38,46 @@ jobs:
pull-requests: write
steps:
- uses: actions/[email protected]
-
name: Create release branch
- name: Create release branch
run: git checkout -b release/${{ github.event.inputs.version }}
-
name: Update changelog
- name: Update changelog
uses: thomaseizinger/[email protected]
with:
tag: ${{ github.event.inputs.version }}
-
name: Initialize mandatory git config
- name: Initialize mandatory git config
run: |
git config user.name "eclipse-tractusx-bot"
git config user.email "[email protected]"
-
uses: ./.github/actions/setup-java
-
name: Bump version in gradle.properties
- uses: ./.github/actions/setup-java
- name: Bump version in gradle.properties
run: |-
# replace the project's (default) version, could be overwritten later with the -Pversion=... flag
sed -i 's/version=.*/version=${{ github.event.inputs.version }}/g' gradle.properties
# replace the project's (default) version, could be overwritten later with the -Pversion=... flag
sed -i 's/version=.*/version=${{ github.event.inputs.version }}/g' gradle.properties
env:
GITHUB_PACKAGE_USERNAME: ${{ github.actor }}
GITHUB_PACKAGE_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
-
name: Bump version in /charts
- name: Bump version in /charts
uses: mikefarah/[email protected]
with:
cmd: |-
find charts -name Chart.yaml -maxdepth 3 | xargs -n1 yq -i '.appVersion = "${{ github.event.inputs.version }}" | .version = "${{ github.event.inputs.version }}"'
-
name: Update Chart READMEs
- name: Update Chart READMEs
uses: addnab/docker-run-action@v3
with:
image: jnorwood/helm-docs:v1.10.0
options: -v ${{ github.workspace }}/charts:/helm-docs
run: |
helm-docs --log-level debug
-
name: Commit changelog and manifest files
- name: Commit changelog and manifest files
id: make-commit
run: |
git add CHANGELOG.md gradle.properties $(find charts -name Chart.yaml) $(find charts -name README.md)
git commit --message "Prepare release ${{ github.event.inputs.version }}"
echo "commit=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
-
name: Push new branch
- name: Push new branch
run: git push origin release/${{ github.event.inputs.version }}
-
name: Create pull request
- name: Create pull request
uses: thomaseizinger/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
70 changes: 32 additions & 38 deletions .github/workflows/helm-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,41 +41,35 @@ jobs:
helm-lint:
runs-on: ubuntu-latest
steps:
##############
### Set-Up ###
##############
-
uses: actions/[email protected]
with:
fetch-depth: 0
-
name: helm (setup)
uses: azure/[email protected]
with:
version: v3.8.1
-
name: python (setup)
uses: actions/setup-python@v4
with:
python-version: 3.7
-
name: chart-testing (setup)
uses: helm/[email protected]
#####################
### Chart Testing ###
#####################
-
name: chart-testing (list-changed)
id: list-changed
run: |
changed=$(ct list-changed --config ct.yaml --target-branch main)
if [[ -n "$changed" ]]; then
echo "changed=true" >> $GITHUB_OUTPUT
fi
-
name: chart-testing (lint)
if: steps.list-changed.outputs.changed == 'true'
run: |
ct lint \
--config ct.yaml \
--all
##############
### Set-Up ###
##############
- uses: actions/[email protected]
with:
fetch-depth: 0
- name: helm (setup)
uses: azure/[email protected]
with:
version: v3.8.1
- name: python (setup)
uses: actions/setup-python@v4
with:
python-version: 3.7
- name: chart-testing (setup)
uses: helm/[email protected]
#####################
### Chart Testing ###
#####################
- name: chart-testing (list-changed)
id: list-changed
run: |
changed=$(ct list-changed --config ct.yaml --target-branch main)
if [[ -n "$changed" ]]; then
echo "changed=true" >> $GITHUB_OUTPUT
fi
- name: chart-testing (lint)
if: steps.list-changed.outputs.changed == 'true'
run: |
ct lint \
--config ct.yaml \
--all
4 changes: 2 additions & 2 deletions .github/workflows/kics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ name: "KICS"

on:
push:
branches: [main, releases]
branches: [ main, releases ]
pull_request:
branches: [main, releases]
branches: [ main, releases ]
workflow_dispatch:

schedule:
Expand Down
72 changes: 31 additions & 41 deletions .github/workflows/publish-new-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,24 +36,21 @@ jobs:
outputs:
RELEASE_VERSION: ${{ steps.release-version.outputs.RELEASE_VERSION }}
steps:
-
name: Extract version from branch name (for release branches)
- name: Extract version from branch name (for release branches)
if: startsWith(github.event.pull_request.head.ref, 'release/')
run: |
BRANCH_NAME="${{ github.event.pull_request.head.ref }}"
VERSION=${BRANCH_NAME#release/}
echo "RELEASE_VERSION=$VERSION" >> $GITHUB_ENV
-
name: Extract version from branch name (for hotfix branches)
- name: Extract version from branch name (for hotfix branches)
if: startsWith(github.event.pull_request.head.ref, 'hotfix/')
run: |
BRANCH_NAME="${{ github.event.pull_request.head.ref }}"
VERSION=${BRANCH_NAME#hotfix/}
echo "RELEASE_VERSION=$VERSION" >> $GITHUB_ENV
-
name: Output release version
- name: Output release version
id: release-version
run: |
echo "RELEASE_VERSION=${{ env.RELEASE_VERSION }}" >> $GITHUB_OUTPUT
Expand All @@ -62,6 +59,8 @@ jobs:
maven-release:
name: Publish extension's release version to maven repository
needs: [ release-version ]
# TODO: remove
continue-on-error: true
runs-on: ubuntu-latest
permissions:
contents: read
Expand Down Expand Up @@ -94,6 +93,8 @@ jobs:
docker-release:
name: Publish Docker images
runs-on: ubuntu-latest
# TODO: remove
continue-on-error: true
needs: [ release-version ]
permissions:
contents: write
Expand All @@ -102,12 +103,12 @@ jobs:
strategy:
fail-fast: false
matrix:
variant: [{dir: edc-controlplane, img: edc-runtime-memory},
{dir: edc-controlplane, img: edc-controlplane-memory-hashicorp-vault},
{dir: edc-controlplane, img: edc-controlplane-postgresql-hashicorp-vault},
{dir: edc-controlplane, img: edc-controlplane-postgresql-azure-vault},
{dir: edc-dataplane, img: edc-dataplane-azure-vault},
{dir: edc-dataplane, img: edc-dataplane-hashicorp-vault}]
variant: [ { dir: edc-controlplane, img: edc-runtime-memory },
{ dir: edc-controlplane, img: edc-controlplane-memory-hashicorp-vault },
{ dir: edc-controlplane, img: edc-controlplane-postgresql-hashicorp-vault },
{ dir: edc-controlplane, img: edc-controlplane-postgresql-azure-vault },
{ dir: edc-dataplane, img: edc-dataplane-azure-vault },
{ dir: edc-dataplane, img: edc-dataplane-hashicorp-vault } ]

steps:
- uses: actions/[email protected]
Expand All @@ -129,28 +130,26 @@ jobs:
name: Publish new helm release
needs: [ release-version ]
runs-on: ubuntu-latest
# TODO: remove
continue-on-error: true
permissions:
contents: write
packages: write
pages: write

if: github.event.pull_request.merged == true && needs.release-version.outputs.RELEASE_VERSION
steps:
-
name: Export RELEASE_VERSION env
- name: Export RELEASE_VERSION env
run: |
echo "RELEASE_VERSION=${{ needs.release-version.outputs.RELEASE_VERSION }}" >> $GITHUB_ENV
-
uses: actions/[email protected]
- uses: actions/[email protected]
with:
fetch-depth: 0
-
name: Install Helm
- name: Install Helm
uses: azure/[email protected]
with:
version: v3.8.1
-
name: Package helm, update index.yaml and push to gh-pages
- name: Package helm, update index.yaml and push to gh-pages
run: |
# Prepare git env
git config user.name "eclipse-tractusx-bot"
Expand Down Expand Up @@ -183,17 +182,14 @@ jobs:
pull-requests: write
if: github.event.pull_request.merged == true && needs.release-version.outputs.RELEASE_VERSION
steps:
-
name: Export RELEASE_VERSION env
- name: Export RELEASE_VERSION env
run: |
echo "RELEASE_VERSION=${{ needs.release-version.outputs.RELEASE_VERSION }}" >> $GITHUB_ENV
-
uses: actions/[email protected]
- uses: actions/[email protected]
with:
# 0 to fetch the full history due to upcoming merge of releases into main branch
fetch-depth: 0
-
name: Create Release Tag
- name: Create Release Tag
id: create_release_tag
run: |
# Prepare git env
Expand All @@ -207,22 +203,16 @@ jobs:
# Create & push tag
git tag --force ${{ env.RELEASE_VERSION }}
git push --force origin ${{ env.RELEASE_VERSION }}
-
name: Create Github Release
id: create_release
uses: thomaseizinger/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create GitHub Release
uses: ncipollo/release-action@v1
with:
target_commitish: ${{ github.event.pull_request.merge_commit_sha }}
tag_name: ${{ env.RELEASE_VERSION }}
name: ${{ env.RELEASE_VERSION }}
draft: false
prerelease: false
-
uses: ./.github/actions/setup-java
-
name: Merge releases back into main and set new snapshot version
generateReleaseNotes: true
tag: ${{ env.RELEASE_VERSION }}
token: ${{ secrets.GITHUB_TOKEN }}
makeLatest: true
removeArtifacts: true
- uses: ./.github/actions/setup-java
- name: Merge releases back into main and set new snapshot version
if: github.event.pull_request.base.ref == 'releases'
run: |
# Prepare git env
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/verify.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
- uses: ./.github/actions/setup-java
- name: Download latest Eclipse Dash
run: |
curl -L https://repo.eclipse.org/service/local/artifact/maven/redirect\?r\=dash-licenses\&g\=org.eclipse.dash\&a\=org.eclipse.dash.licenses\&v\=LATEST --output dash.jar
curl -L https://repo.eclipse.org/service/local/artifact/maven/redirect\?r\=dash-licenses\&g\=org.eclipse.dash\&a\=org.eclipse.dash.licenses\&v\=LATEST --output dash.jar
- name: Regenerate DEPENDENCIES
run: |
# dash returns a nonzero exit code if there are libs that need review. the "|| true" avoids that
Expand Down
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.5.0-test1] - 2023-07-06

## [0.5.0-rc5] - 2023-07-05

### Changed
Expand Down Expand Up @@ -363,7 +365,9 @@ corresponding [documentation](/docs/migration/Version_0.0.x_0.1.x.md).

## [0.0.1] - 2022-05-13

[Unreleased]: https://github.com/eclipse-tractusx/tractusx-edc/compare/0.5.0-rc5...HEAD
[Unreleased]: https://github.com/paullatzelsperger/tractusx-edc/compare/0.5.0-test1...HEAD

[0.5.0-test1]: https://github.com/paullatzelsperger/tractusx-edc/compare/0.5.0-rc5...0.5.0-test1

[0.5.0-rc5]: https://github.com/eclipse-tractusx/tractusx-edc/compare/0.5.0-rc4...0.5.0-rc5

Expand Down
Loading

0 comments on commit ece3736

Please sign in to comment.