Skip to content

Commit 7cea1f4

Browse files
committed
Create an initial build pipeline
1 parent 088cb00 commit 7cea1f4

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

.github/workflow/release.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Release Workflow
2+
3+
on:
4+
push:
5+
branches:
6+
- main-workable
7+
8+
jobs:
9+
release:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v2
15+
16+
- name: Build with SAM
17+
run: sam build --use-container
18+
19+
- name: Zip the contents
20+
run: |
21+
commit_hash=$(git rev-parse --short HEAD)
22+
zip -r apache-iceberg-monitoring-$commit_hash.zip .aws-sam/build/IcebergMetricsLambda/
23+
24+
- name: Get changelog
25+
id: changelog
26+
run: |
27+
git fetch --prune --unshallow
28+
previous_release=$(git tag --sort=-creatordate | head -n 1)
29+
changelog=$(git log $previous_release..HEAD --pretty=format:'* %s')
30+
echo "changelog<<EOF" >> $GITHUB_ENV
31+
echo "$changelog" >> $GITHUB_ENV
32+
echo "EOF" >> $GITHUB_ENV
33+
34+
- name: Create Release
35+
id: create_release
36+
uses: ncipollo/release-action@v1
37+
with:
38+
tag: "apache-iceberg-monitoring-${{ github.sha }}"
39+
name: "apache-iceberg-monitoring-${{ github.sha }}"
40+
body: ${{ env.changelog }}
41+
draft: false
42+
prerelease: false
43+
44+
- name: Upload Release Asset
45+
uses: ncipollo/upload-release-asset@v1
46+
with:
47+
upload_url: ${{ steps.create_release.outputs.upload_url }}
48+
asset: apache-iceberg-monitoring-${{ github.sha }}.zip

0 commit comments

Comments
 (0)