@@ -2,7 +2,7 @@ name: Build and Release
22
33on :
44 push :
5- branches : [ fabisev/artifact-publishing ]
5+ branches : [ main ]
66 tags : [ 'v*', 'rc-*' ]
77 pull_request :
88 branches : [ main ]
7777 docker run --rm unit/nodejs.${{ matrix.node-version }}x
7878
7979 publish :
80- if : startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/fabisev/artifact-publishing'
80+ if : startsWith(github.ref, 'refs/tags/')
8181 runs-on : codebuild-project-awsaws-lambda-nodejs-runtime-interface-client-${{ github.run_id }}-${{ github.run_attempt }}
8282 needs : [build, test]
8383 permissions :
@@ -103,13 +103,7 @@ jobs:
103103 - name : Determine version and package name
104104 id : version
105105 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
113107 RC_NUMBER=${GITHUB_REF#refs/tags/rc-}
114108 PACKAGE_VERSION="${{ needs.build.outputs.version }}-rc.${RC_NUMBER}"
115109 echo "package_version=$PACKAGE_VERSION" >> $GITHUB_OUTPUT
@@ -123,12 +117,10 @@ jobs:
123117
124118 - name : Publish to npm
125119 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
130122 else
131- npm publish icecream-shop -*.tgz
123+ npm publish aws-lambda-ric -*.tgz
132124 fi
133125
134126 - name : Create GitHub Release
0 commit comments