diff --git a/frontend/.github/workflows/release_to_cdn.yml b/frontend/.github/workflows/release.yml similarity index 73% rename from frontend/.github/workflows/release_to_cdn.yml rename to frontend/.github/workflows/release.yml index d63bf671ec..f6254319b0 100644 --- a/frontend/.github/workflows/release_to_cdn.yml +++ b/frontend/.github/workflows/release.yml @@ -1,4 +1,4 @@ -name: 'Release static assets to CDN' +name: 'Release unleash-frontend' on: push: tags: @@ -28,7 +28,13 @@ jobs: - name: Get the version id: get_version run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} - - name: Deploy static assets to S3 + - name: Publish to NPM + run: | + TAG=$(echo $GITHUB_REF_NAME | grep -oP '^v\d+\.\d+\.\d+-?\K(\w+)?') + npm publish --tag ${TAG:-latest} + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + - name: Publish static assets to S3 run: | aws s3 cp build/ s3://getunleash-static/unleash/${{ steps.get_version.outputs.VERSION }} --recursive