2020-08-29 10:04:35 +03:00
|
|
|
name: Build release
|
2020-05-24 12:50:21 +03:00
|
|
|
on:
|
2020-08-29 10:04:35 +03:00
|
|
|
release:
|
|
|
|
types: [published, edited]
|
|
|
|
|
2020-05-24 12:50:21 +03:00
|
|
|
jobs:
|
2020-08-29 10:04:35 +03:00
|
|
|
build-release:
|
2020-05-24 12:50:21 +03:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@master
|
|
|
|
- name: Install & build
|
|
|
|
uses: actions/setup-node@master
|
|
|
|
- run: npm install
|
|
|
|
- run: npm run build
|
|
|
|
- name: Zip it
|
|
|
|
uses: montudor/action-zip@v0.1.0
|
|
|
|
with:
|
|
|
|
args: zip -qq -r ./release.zip ./vuetorrent
|
|
|
|
- name: Get Version
|
2020-12-08 12:11:50 +03:00
|
|
|
run: echo "VERSION=$(jq -r .version package.json)" >> $GITHUB_ENV
|
2020-08-29 10:04:35 +03:00
|
|
|
- name: Upload
|
|
|
|
uses: actions/upload-release-asset@v1.0.1
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2020-05-24 12:50:21 +03:00
|
|
|
with:
|
2020-08-29 10:04:35 +03:00
|
|
|
upload_url: ${{ github.event.release.upload_url }}
|
|
|
|
asset_path: ./release.zip
|
|
|
|
asset_name: release.zip
|
|
|
|
asset_content_type: application/zip
|