@@ -2,7 +2,7 @@ name: Build and Release
2
2
3
3
on :
4
4
push :
5
- branches : [ fabisev/artifact-publishing ]
5
+ branches : [ main ]
6
6
tags : [ 'v*', 'rc-*' ]
7
7
pull_request :
8
8
branches : [ main ]
77
77
docker run --rm unit/nodejs.${{ matrix.node-version }}x
78
78
79
79
publish :
80
- if : startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/fabisev/artifact-publishing'
80
+ if : startsWith(github.ref, 'refs/tags/')
81
81
runs-on : codebuild-project-awsaws-lambda-nodejs-runtime-interface-client-${{ github.run_id }}-${{ github.run_attempt }}
82
82
needs : [build, test]
83
83
permissions :
@@ -103,13 +103,7 @@ jobs:
103
103
- name : Determine version and package name
104
104
id : version
105
105
run : |
106
- npm pkg set name="icecream-shop"
107
- if [[ "${{ github.ref }}" == refs/heads/fabisev/artifact-publishing ]]; then
108
- PACKAGE_VERSION="${{ needs.build.outputs.version }}-test.$(date +%s)"
109
- echo "package_version=$PACKAGE_VERSION" >> $GITHUB_OUTPUT
110
- echo "is_test=true" >> $GITHUB_OUTPUT
111
- npm version $PACKAGE_VERSION --no-git-tag-version
112
- elif [[ "${{ github.ref }}" == refs/tags/rc-* ]]; then
106
+ if [[ "${{ github.ref }}" == refs/tags/rc-* ]]; then
113
107
RC_NUMBER=${GITHUB_REF#refs/tags/rc-}
114
108
PACKAGE_VERSION="${{ needs.build.outputs.version }}-rc.${RC_NUMBER}"
115
109
echo "package_version=$PACKAGE_VERSION" >> $GITHUB_OUTPUT
@@ -123,12 +117,10 @@ jobs:
123
117
124
118
- name : Publish to npm
125
119
run : |
126
- if [[ "${{ steps.version.outputs.is_test }}" == "true" ]]; then
127
- npm publish icecream-shop-*.tgz --tag test
128
- elif [[ "${{ steps.version.outputs.is_rc }}" == "true" ]]; then
129
- npm publish icecream-shop-*.tgz --tag rc
120
+ if [[ "${{ steps.version.outputs.is_rc }}" == "true" ]]; then
121
+ npm publish aws-lambda-ric-*.tgz --tag rc
130
122
else
131
- npm publish icecream-shop -*.tgz
123
+ npm publish aws-lambda-ric -*.tgz
132
124
fi
133
125
134
126
- name : Create GitHub Release
0 commit comments