Skip to content

chore(ci): prepare CI actions for v1 releases #1621

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
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
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: "CodeQL"

on:
push:
branches: [develop, v2]
branches: [v1]

jobs:
analyze:
Expand Down
35 changes: 0 additions & 35 deletions .github/workflows/on_push_docs.yml

This file was deleted.

26 changes: 7 additions & 19 deletions .github/workflows/on_release_notes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@ name: Publish to PyPi
# See MAINTAINERS.md "Releasing a new version" for release mechanisms

env:
BRANCH: develop
BRANCH: v1

on:
release:
# We can't filter by tag here, so we filter later on the first job
types: [published]
workflow_dispatch:
inputs:
Expand All @@ -45,6 +46,7 @@ on:

jobs:
release:
if: ${{ startsWith(github.ref, 'refs/tags/v1') }}
environment: release
runs-on: ubuntu-latest
permissions:
Expand Down Expand Up @@ -121,22 +123,8 @@ jobs:
alias: latest
detached_mode: true

post_release:
publish_layer:
needs: release
permissions:
contents: read
issues: write
discussions: write
pull-requests: write
runs-on: ubuntu-latest
env:
RELEASE_VERSION: ${{ needs.release.outputs.RELEASE_VERSION }}
steps:
- uses: actions/checkout@v3
- name: Close issues related to this release
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const post_release = require('.github/scripts/post_release.js')
await post_release({github, context, core})
uses: ./.github/workflows/publish_layer.yml
with:
latest_published_version: ${{ needs.release.outputs.RELEASE_VERSION }}
21 changes: 10 additions & 11 deletions .github/workflows/publish_layer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,16 @@ on:
description: "Latest PyPi published version to rebuild latest docs for, e.g. v1.22.0"
default: "v1.22.0"
required: true
workflow_run:
workflows: ["Publish to PyPi"]
types:
- completed
workflow_call:
inputs:
latest_published_version:
type: string
description: "Latest PyPi published version to rebuild latest docs for, e.g. v1.22.0"
required: true

jobs:
build-layer:
runs-on: ubuntu-latest
if: ${{ (github.event.workflow_run.conclusion == 'success') || (github.event_name == 'workflow_dispatch') }}
defaults:
run:
working-directory: ./layer
Expand Down Expand Up @@ -50,13 +51,13 @@ jobs:
RELEASE_INPUT=${{ inputs.latest_published_version }}
LATEST_TAG=$(git describe --tag --abbrev=0)
RELEASE_TAG_VERSION=${RELEASE_INPUT:-$LATEST_TAG}
echo "RELEASE_TAG_VERSION=${RELEASE_TAG_VERSION:1}" >> $GITHUB_ENV
echo "RELEASE_TAG_VERSION=${RELEASE_TAG_VERSION:1}" >> "$GITHUB_ENV"
- name: install cdk and deps
run: |
npm install -g [email protected]
cdk --version
- name: CDK build
run: cdk synth --context version=$RELEASE_TAG_VERSION -o cdk.out
run: cdk synth --context version="$RELEASE_TAG_VERSION" -o cdk.out
- name: zip output
run: zip -r cdk.out.zip cdk.out
- name: Archive CDK artifacts
Expand All @@ -66,8 +67,7 @@ jobs:
path: layer/cdk.out.zip

deploy-beta:
needs:
- build-layer
needs: build-layer
uses: ./.github/workflows/reusable_deploy_layer_stack.yml
secrets: inherit
with:
Expand All @@ -76,8 +76,7 @@ jobs:
environment: "layer-beta"

deploy-prod:
needs:
- deploy-beta
needs: deploy-beta
uses: ./.github/workflows/reusable_deploy_layer_stack.yml
secrets: inherit
with:
Expand Down
19 changes: 0 additions & 19 deletions .github/workflows/publish_v2_layer.yml

This file was deleted.

6 changes: 2 additions & 4 deletions .github/workflows/python_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ on:
- "poetry.lock"
- "mypy.ini"
branches:
- develop
- v2
- v1
push:
paths:
- "aws_lambda_powertools/**"
Expand All @@ -19,8 +18,7 @@ on:
- "poetry.lock"
- "mypy.ini"
branches:
- develop
- v2
- v1

jobs:
build:
Expand Down
15 changes: 0 additions & 15 deletions .github/workflows/release-drafter.yml

This file was deleted.

28 changes: 0 additions & 28 deletions .github/workflows/reusable_deploy_v2_sar.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/reusable_publish_changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ permissions:
contents: write

env:
BRANCH: develop
BRANCH: v1

jobs:
publish_changelog:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable_publish_docs.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Reusable publish documentation

env:
BRANCH: develop
BRANCH: v1
ORIGIN: awslabs/aws-lambda-powertools-python

on:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run-e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
workflow_dispatch:

push:
branches: [develop, v2]
branches: [v1]
paths:
- "aws_lambda_powertools/**"
- "tests/e2e/**"
Expand Down
36 changes: 0 additions & 36 deletions .github/workflows/v2_on_push_docs.yml

This file was deleted.

14 changes: 0 additions & 14 deletions .github/workflows/v2_rebuild_latest_docs.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ repos:
- id: cfn-python-lint
files: examples/.*\.(yaml|yml)$
- repo: https://github.com/rhysd/actionlint
rev: v1.6.16
rev: v1.6.21
hooks:
- id: actionlint-docker
args: [-pyflakes=]