1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-07-26 13:48:33 +02:00

fix: add release action to support npm and cdn

This commit is contained in:
Ivar Conradi Østhus 2022-04-05 14:26:17 +02:00
parent 43834be065
commit 7cb85111e4

View File

@ -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