File tree Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Original file line number Diff line number Diff line change
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
You can’t perform that action at this time.
0 commit comments