chore: cleanup debuging code after fix attempt #17
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release Workflow | |
on: | |
push: | |
branches: | |
- main-workable | |
workflow_dispatch: | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v5 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.x' | |
- name: Install AWS SAM CLI | |
run: pip install aws-sam-cli | |
- name: Build with SAM | |
run: sam build --use-container | |
- name: Zip the contents | |
id: zip | |
run: | | |
commit_hash=$(git rev-parse --short HEAD) | |
echo "commit_hash=${commit_hash}" >> $GITHUB_OUTPUT | |
zip_name="apache-iceberg-monitoring-${commit_hash}.zip" | |
cd .aws-sam/build/IcebergMetricsLambda | |
zip -r "../../../${zip_name}" . | |
echo "zip_name=${zip_name}" >> $GITHUB_OUTPUT | |
- name: Generate changelog with commit links | |
id: changelog | |
run: | | |
repo_url="https://github.com/${{ github.repository }}" | |
git fetch --prune --unshallow | |
previous_tag=$(git tag --sort=-creatordate | head -n 1) | |
if [ -z "$previous_tag" ]; then | |
range="" | |
else | |
range="$previous_tag..HEAD" | |
fi | |
changelog="Commit changes for **$range**:"$'\n' | |
while read -r hash message; do | |
changelog="${changelog}* [${message}](${repo_url}/commit/${hash})"$'\n' | |
done < <(git log $range --pretty=format:"%H %s"; echo "") | |
echo "changelog<<EOF" >> $GITHUB_OUTPUT | |
echo "$changelog" >> $GITHUB_OUTPUT | |
echo "EOF" >> $GITHUB_OUTPUT | |
- name: Create Release and Upload Asset (gh CLI) | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
# Create the release | |
gh release create "apache-iceberg-monitoring-${{ steps.zip.outputs.commit_hash }}" \ | |
--title "apache-iceberg-monitoring-${{ steps.zip.outputs.commit_hash }}" \ | |
--notes "${{ steps.changelog.outputs.changelog }}" \ | |
--target ${{ github.sha }} \ | |
./${{ steps.zip.outputs.zip_name }} |