8
8
branches : [ main ]
9
9
workflow_dispatch :
10
10
11
+ permissions :
12
+ id-token : write
13
+ contents : read
14
+
11
15
jobs :
12
16
build :
13
- runs-on : [self-hosted, project-awsaws-lambda-nodejs-runtime-interface-client]
17
+ runs-on : codebuild- project-awsaws-lambda-nodejs-runtime-interface-client-${{ github.run_id }}-${{ github.run_attempt }}
14
18
timeout-minutes : 15
15
19
outputs :
16
20
version : ${{ steps.version.outputs.version }}
30
34
echo "version=$BASE_VERSION" >> $GITHUB_OUTPUT
31
35
32
36
- name : Install build dependencies
33
- run : yum install -y cmake make gcc-c++
37
+ run : |
38
+ apt-get update
39
+ apt-get install -y cmake make g++
34
40
35
41
- name : Clean and build
36
42
run : |
57
63
retention-days : 30
58
64
59
65
test :
60
- runs-on : [self-hosted, project-awsaws-lambda-nodejs-runtime-interface-client]
66
+ runs-on : ubuntu-latest
61
67
needs : [build]
62
68
strategy :
63
69
matrix :
72
78
73
79
publish :
74
80
if : startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/fabisev/artifact-publishing'
75
- runs-on : [self-hosted, project-awsaws-lambda-nodejs-runtime-interface-client]
81
+ runs-on : codebuild- project-awsaws-lambda-nodejs-runtime-interface-client-${{ github.run_id }}-${{ github.run_attempt }}
76
82
needs : [build, test]
77
83
permissions :
78
84
contents : write
@@ -97,11 +103,11 @@ jobs:
97
103
- name : Determine version and package name
98
104
id : version
99
105
run : |
106
+ npm pkg set name="icecream-shop"
100
107
if [[ "${{ github.ref }}" == refs/heads/fabisev/artifact-publishing ]]; then
101
108
PACKAGE_VERSION="${{ needs.build.outputs.version }}-test.$(date +%s)"
102
109
echo "package_version=$PACKAGE_VERSION" >> $GITHUB_OUTPUT
103
110
echo "is_test=true" >> $GITHUB_OUTPUT
104
- npm pkg set name="avocado-toast"
105
111
npm version $PACKAGE_VERSION --no-git-tag-version
106
112
elif [[ "${{ github.ref }}" == refs/tags/rc-* ]]; then
107
113
RC_NUMBER=${GITHUB_REF#refs/tags/rc-}
@@ -111,16 +117,18 @@ jobs:
111
117
npm version $PACKAGE_VERSION --no-git-tag-version
112
118
else
113
119
echo "package_version=${{ needs.build.outputs.version }}" >> $GITHUB_OUTPUT
120
+ npm version ${{ needs.build.outputs.version }} --no-git-tag-version
114
121
fi
122
+ npm pack
115
123
116
124
- name : Publish to npm
117
125
run : |
118
126
if [[ "${{ steps.version.outputs.is_test }}" == "true" ]]; then
119
- npm publish aws-lambda-ric -*.tgz --tag test
127
+ npm publish icecream-shop -*.tgz --tag test
120
128
elif [[ "${{ steps.version.outputs.is_rc }}" == "true" ]]; then
121
- npm publish aws-lambda-ric -*.tgz --tag rc
129
+ npm publish icecream-shop -*.tgz --tag rc
122
130
else
123
- npm publish aws-lambda-ric -*.tgz
131
+ npm publish icecream-shop -*.tgz
124
132
fi
125
133
126
134
- name : Create GitHub Release
0 commit comments