Skip to content

Commit c645473

Browse files
author
Fabiana Severin
committed
Preparing github actions workflow for merge with main
1 parent cad8992 commit c645473

File tree

1 file changed

+6
-14
lines changed

1 file changed

+6
-14
lines changed

.github/workflows/build-and-release.yml

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Build and Release
22

33
on:
44
push:
5-
branches: [ fabisev/artifact-publishing ]
5+
branches: [ main ]
66
tags: [ 'v*', 'rc-*' ]
77
pull_request:
88
branches: [ main ]
@@ -77,7 +77,7 @@ jobs:
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

Comments
 (0)