Skip to content
Merged
Show file tree
Hide file tree
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
65 changes: 58 additions & 7 deletions .github/workflows/release-prep.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,71 @@ on:
workflow_dispatch:
inputs:
targetRelease:
description: 'Release number to upgrade to. For example X.X.X'
description: 'Release number to upgrade to. For example X.X.X. Follow Semantic Versioning when deciding on next version.'
required: true
previousRelease:
description: 'Current latest maven release'
required: false

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Find and Replace ${{ github.event.inputs.previousRelease }} with ${{ github.event.inputs.targetRelease }}
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
- name: Set current release version env variable
run: |
echo "CURRENT_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV
- name: Find and Replace ${{ env.CURRENT_VERSION }} with ${{ github.event.inputs.targetRelease }} in mkdocs.yml
uses: jacobtomlinson/gha-find-replace@v2
with:
find: ${{ github.event.inputs.previousRelease }}
find: 'version: ${{ env.CURRENT_VERSION }}'
replace: 'version: ${{ github.event.inputs.targetRelease }}'
regex: false
include: "mkdocs.yml"
- name: Find and Replace ${{ env.CURRENT_VERSION }} with ${{ github.event.inputs.targetRelease }} in pom.xml
uses: jacobtomlinson/gha-find-replace@v2
with:
find: ${{ env.CURRENT_VERSION }}
replace: ${{ github.event.inputs.targetRelease }}
regex: false
include: "**/*pom.xml"
- name: Find and Replace ${{ env.CURRENT_VERSION }} with ${{ github.event.inputs.targetRelease }} in build.gradle
uses: jacobtomlinson/gha-find-replace@v2
with:
find: ${{ env.CURRENT_VERSION }}
replace: ${{ github.event.inputs.targetRelease }}
regex: false
include: "**/*build.gradle"
- name: Find and Replace ${{ env.CURRENT_VERSION }} with ${{ github.event.inputs.targetRelease }} in README.md
uses: jacobtomlinson/gha-find-replace@v2
with:
find: ${{ env.CURRENT_VERSION }}
replace: ${{ github.event.inputs.targetRelease }}
regex: false
regex: false
include: "README.md"
- name: Create changelog placeholder for ${{ github.event.inputs.targetRelease }}
uses: jacobtomlinson/gha-find-replace@v2
with:
find: '## [Unreleased]'
replace: |
## [Unreleased]

## [${{ github.event.inputs.targetRelease }}] - ${{ steps.date.outputs.date }}

<PLEASE REMEBER TO UPDATE CHANGE LOG>

regex: false
include: CHANGELOG.md
- name: Create Release Pull Request
uses: peter-evans/create-pull-request@v3
with:
commit-message: chore:prep release ${{ github.event.inputs.targetRelease }}
token: ${{ secrets.RELEASE }}
signoff: false
branch: prep-release-${{ github.event.inputs.targetRelease }}
delete-branch: true
title: chore:Prep release ${{ github.event.inputs.targetRelease }}
body: |
This is automated release prep. Remember to update [CHANGELOG.md](https://github.com/awslabs/aws-lambda-powertools-java/blob/prep-release-${{ github.event.inputs.targetRelease }}/CHANGELOG.md) to capture changes in this release. Please review changes carefully before merging.

* [ ] Updated CHANGELOG.md
2 changes: 1 addition & 1 deletion docs/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
FROM squidfunk/mkdocs-material
RUN pip install mkdocs-git-revision-date-plugin
RUN pip install mkdocs-git-revision-date-plugin mkdocs-macros-plugin
12 changes: 6 additions & 6 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,17 @@ For more information about the project and available options refer to this [repo
<dependency>
<groupId>software.amazon.lambda</groupId>
<artifactId>powertools-tracing</artifactId>
<version>1.10.1</version>
<version>{{ powertools.version }}</version>
</dependency>
<dependency>
<groupId>software.amazon.lambda</groupId>
<artifactId>powertools-logging</artifactId>
<version>1.10.1</version>
<version>{{ powertools.version }}</version>
</dependency>
<dependency>
<groupId>software.amazon.lambda</groupId>
<artifactId>powertools-metrics</artifactId>
<version>1.10.1</version>
<version>{{ powertools.version }}</version>
</dependency>
...
</dependencies>
Expand Down Expand Up @@ -114,9 +114,9 @@ For more information about the project and available options refer to this [repo
}

dependencies {
aspect 'software.amazon.lambda:powertools-logging:1.10.1'
aspect 'software.amazon.lambda:powertools-tracing:1.10.1'
aspect 'software.amazon.lambda:powertools-metrics:1.10.1'
aspect 'software.amazon.lambda:powertools-logging:{{ powertools.version }}'
aspect 'software.amazon.lambda:powertools-tracing:{{ powertools.version }}'
aspect 'software.amazon.lambda:powertools-metrics:{{ powertools.version }}'
}
```

Expand Down
4 changes: 2 additions & 2 deletions docs/utilities/batch.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ To install this utility, add the following dependency to your project.
<dependency>
<groupId>software.amazon.lambda</groupId>
<artifactId>powertools-sqs</artifactId>
<version>1.10.1</version>
<version>{{ powertools.version }}</version>
</dependency>
...
</dependencies>
Expand Down Expand Up @@ -82,7 +82,7 @@ To install this utility, add the following dependency to your project.

dependencies {
...
aspect 'software.amazon.lambda:powertools-sqs:1.10.1'
aspect 'software.amazon.lambda:powertools-sqs:{{ powertools.version }}'
}
```

Expand Down
4 changes: 2 additions & 2 deletions docs/utilities/custom_resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ To install this utility, add the following dependency to your project.
<dependency>
<groupId>software.amazon.lambda</groupId>
<artifactId>powertools-cloudformation</artifactId>
<version>1.10.1</version>
<version>{{ powertools.version }}</version>
</dependency>
```

Expand All @@ -33,7 +33,7 @@ To install this utility, add the following dependency to your project.
```groovy
dependencies {
...
implementation 'software.amazon.lambda:powertools-cloudformation:1.10.1'
implementation 'software.amazon.lambda:powertools-cloudformation:{{ powertools.version }}'
}
```

Expand Down
6 changes: 3 additions & 3 deletions docs/utilities/parameters.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ To install this utility, add the following dependency to your project.
<dependency>
<groupId>software.amazon.lambda</groupId>
<artifactId>powertools-parameters</artifactId>
<version>1.10.1</version>
<version>{{ powertools.version }}</version>
</dependency>
```
=== "Gradle"

```groovy
dependencies {
...
aspect 'software.amazon.lambda:powertools-parameters:1.10.1'
aspect 'software.amazon.lambda:powertools-parameters:{{ powertools.version }}'
}
```

Expand Down Expand Up @@ -433,6 +433,6 @@ If you want to use the ```@Param``` annotation in your project add configuration

dependencies {
...
aspect 'software.amazon.lambda:powertools-parameters:1.10.1'
aspect 'software.amazon.lambda:powertools-parameters:{{ powertools.version }}'
}
```
4 changes: 2 additions & 2 deletions docs/utilities/sqs_large_message_handling.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ To install this utility, add the following dependency to your project.
<dependency>
<groupId>software.amazon.lambda</groupId>
<artifactId>powertools-sqs</artifactId>
<version>1.10.1</version>
<version>{{ powertools.version }}</version>
</dependency>
...
</dependencies>
Expand Down Expand Up @@ -90,7 +90,7 @@ To install this utility, add the following dependency to your project.

dependencies {
...
aspect 'software.amazon.lambda:powertools-sqs:1.10.1'
aspect 'software.amazon.lambda:powertools-sqs:{{ powertools.version }}'
}
```

Expand Down
4 changes: 2 additions & 2 deletions docs/utilities/validation.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ To install this utility, add the following dependency to your project.
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>powertools-validation</artifactId>
<version>1.10.1</version>
<version>{{ powertools.version }}</version>
</dependency>
...
</dependencies>
Expand Down Expand Up @@ -71,7 +71,7 @@ To install this utility, add the following dependency to your project.
}

dependencies {
aspect 'software.amazon.lambda:powertools-validation:1.10.1'
aspect 'software.amazon.lambda:powertools-validation:{{ powertools.version }}'
}
```

Expand Down
4 changes: 4 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,17 @@ copyright: Copyright &copy; 2021 Amazon Web Services
plugins:
- git-revision-date
- search
- macros

extra_css:
- stylesheets/extra.css
extra_javascript:
- javascript/aws-amplify.min.js
- javascript/extra.js

extra:
powertools:
version: 1.10.1

repo_url: https://github.com/awslabs/aws-lambda-powertools-java
edit_uri: edit/master/docs