2020-08-29 10:04:35 +03:00
|
|
|
name: Build release
|
2020-05-24 12:50:21 +03:00
|
|
|
on:
|
2021-02-07 21:18:14 +03:00
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
2020-05-24 12:50:21 +03:00
|
|
|
jobs:
|
2021-02-07 21:18:14 +03:00
|
|
|
setup-release:
|
|
|
|
outputs:
|
|
|
|
release_created: ${{ steps.release.outputs.release_created }}
|
|
|
|
upload_url: ${{ steps.release.outputs.upload_url }}
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
2023-09-05 08:18:03 +03:00
|
|
|
uses: actions/checkout@v4
|
2021-02-07 21:18:14 +03:00
|
|
|
- name: Run release please
|
2023-10-20 16:15:28 +03:00
|
|
|
uses: google-github-actions/release-please-action@v3.7
|
2021-02-07 21:18:14 +03:00
|
|
|
id: release
|
|
|
|
with:
|
|
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
release-type: node
|
2022-06-05 11:09:55 +03:00
|
|
|
package-name: vuetorrent
|
2022-11-15 11:36:54 +03:00
|
|
|
changelog-types:
|
|
|
|
'[{"type":"feat","section":"Features","hidden":false},{"type":"fix","section":"Bug Fixes","hidden":false},{"type":"perf","section":"Improvements","hidden":false}]'
|
2021-11-27 12:40:45 +03:00
|
|
|
|
2021-02-07 21:18:14 +03:00
|
|
|
upload-release:
|
|
|
|
needs: setup-release
|
|
|
|
if: ${{ needs.setup-release.outputs.release_created }}
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
2023-09-05 08:18:03 +03:00
|
|
|
uses: actions/checkout@v4
|
2021-02-07 21:18:14 +03:00
|
|
|
- name: Setup Node.js
|
2023-06-23 10:35:36 +03:00
|
|
|
uses: actions/setup-node@v3
|
2021-02-07 21:18:14 +03:00
|
|
|
with:
|
2022-11-15 11:41:14 +03:00
|
|
|
node-version: '18'
|
2021-02-07 21:18:14 +03:00
|
|
|
- name: Build Node.js cache
|
2023-06-23 10:36:12 +03:00
|
|
|
uses: actions/cache@v3
|
2021-02-07 21:18:14 +03:00
|
|
|
with:
|
|
|
|
path: ~/.npm
|
|
|
|
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
|
|
|
restore-keys: ${{ runner.os }}-node-
|
|
|
|
- name: Install dependencies
|
|
|
|
run: npm ci
|
|
|
|
- name: Build VueTorrent
|
|
|
|
run: npm run build
|
|
|
|
- name: Zip VueTorrent
|
|
|
|
run: zip -qq -r ./vuetorrent.zip ./vuetorrent
|
|
|
|
- name: Upload VueTorrent release
|
|
|
|
uses: actions/upload-release-asset@v1
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
|
|
|
upload_url: ${{ needs.setup-release.outputs.upload_url }}
|
|
|
|
asset_path: ./vuetorrent.zip
|
|
|
|
asset_name: vuetorrent.zip
|
|
|
|
asset_content_type: application/zip
|
|
|
|
push-release:
|
|
|
|
needs: setup-release
|
|
|
|
if: ${{ needs.setup-release.outputs.release_created }}
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
2023-09-05 08:18:03 +03:00
|
|
|
uses: actions/checkout@v4
|
2023-10-20 16:15:28 +03:00
|
|
|
|
2021-02-07 21:18:14 +03:00
|
|
|
- name: Setup Node.js
|
2023-06-23 10:35:36 +03:00
|
|
|
uses: actions/setup-node@v3
|
2021-02-07 21:18:14 +03:00
|
|
|
with:
|
2022-11-15 11:41:14 +03:00
|
|
|
node-version: '18'
|
2023-10-20 16:15:28 +03:00
|
|
|
|
2021-02-07 21:18:14 +03:00
|
|
|
- name: Build Node.js cache
|
2023-06-23 10:36:12 +03:00
|
|
|
uses: actions/cache@v3
|
2021-02-07 21:18:14 +03:00
|
|
|
with:
|
|
|
|
path: ~/.npm
|
|
|
|
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
|
|
|
restore-keys: ${{ runner.os }}-node-
|
2023-10-20 16:15:28 +03:00
|
|
|
|
2021-02-07 21:18:14 +03:00
|
|
|
- name: Install dependencies
|
|
|
|
run: npm ci
|
2023-10-20 16:15:28 +03:00
|
|
|
|
2021-02-07 21:18:14 +03:00
|
|
|
- name: Build VueTorrent
|
|
|
|
run: npm run build
|
2023-10-20 16:15:28 +03:00
|
|
|
|
2021-02-07 21:18:14 +03:00
|
|
|
- name: Push to latest-release
|
2023-07-18 11:27:36 +03:00
|
|
|
uses: JamesIves/github-pages-deploy-action@v4.4.3
|
2021-02-07 21:18:14 +03:00
|
|
|
with:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
BRANCH: latest-release
|
2021-02-18 23:27:47 +03:00
|
|
|
FOLDER: ./vuetorrent
|