update release workflow to work with npm

This commit is contained in:
nklhrstv 2020-07-15 15:32:24 +03:00
parent 1fc1de2e59
commit 03a5268f23

View file

@ -7,20 +7,16 @@ on:
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
name: Checkout
- uses: actions/setup-node@v1
name: Setup Node
with:
registry-url: 'https://npm.pkg.github.com'
- name: Checkout
uses: actions/checkout@v1
- name: Install NPM dependencies
run: npm install
- name: Build
run: yarn install && yarn build
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: zip -r stremio-web.zip ./build
- name: Upload binaries to release
run: npm run build
- name: Zip build artifact
run: zip -r stremio-web.zip ./build
- name: Upload build artifact to GitHub release assets
uses: svenstaro/upload-release-action@v1-release
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
@ -28,9 +24,9 @@ jobs:
asset_name: stremio-web.zip
tag: ${{ github.ref }}
overwrite: true
- run: |
- name: Upload build artifact to Netlify
run: |
curl -H "Content-Type: application/zip" \
-H "Authorization: Bearer ${{ secrets.netlify_access_token }}" \
--data-binary "@stremio-web.zip" \
https://api.netlify.com/api/v1/sites/stremio-staging.netlify.com/deploys