Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
feat: auto releasing ci (#146)
* feat: auto releasing ci

* chore: pin major version for upload-release-asset

* ci: remove duplicate install deps

* docs: update readme

* chore: remove deprecated release script

Co-authored-by: Daan Wijns <dw.daanwijns@gmail.com>
  • Loading branch information
jef and WDaan committed Feb 7, 2021
1 parent 6860f06 commit d217627
Show file tree
Hide file tree
Showing 4 changed files with 98 additions and 72 deletions.
103 changes: 77 additions & 26 deletions .github/workflows/release.yml
@@ -1,29 +1,80 @@
name: Build release
on:
release:
types: [published, edited]

push:
branches:
- master
jobs:
build-release:
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
run: echo "VERSION=$(jq -r .version package.json)" >> $GITHUB_ENV
- name: Upload
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./release.zip
asset_name: release.zip
asset_content_type: application/zip
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
uses: actions/checkout@v2
- name: Run release please
uses: google-github-actions/release-please-action@v2.16
id: release
with:
token: ${{ secrets.GITHUB_TOKEN }}
release-type: node
package-name: VueTorrent
upload-release:
needs: setup-release
if: ${{ needs.setup-release.outputs.release_created }}
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup Node.js
- uses: actions/setup-node@v2
with:
node-version: '14'
- name: Build Node.js cache
uses: actions/cache@v2
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
uses: actions/checkout@v2
- name: Setup Node.js
- uses: actions/setup-node@v2
with:
node-version: '14'
- name: Build Node.js cache
uses: actions/cache@v2
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: Push to latest-release
uses: JamesIves/github-pages-deploy-action@3.7.1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: latest-release
FOLDER: ./vuetorrent/public
34 changes: 19 additions & 15 deletions .github/workflows/test.yml
@@ -1,25 +1,29 @@
name: Test Core Components
on:
push
pull_request:
branches:
- master
push:
branches:
- master

jobs:
test-core:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Cache node modules
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup Node.js
- uses: actions/setup-node@v2
with:
node-version: '14'
- name: Build Node.js cache
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install & test
uses: actions/setup-node@master
- run: npm ci
- run: npm run test:unit
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: ${{ runner.os }}-node-
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm run test:unit
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -22,13 +22,13 @@ The sleekest looking WebUI for qBittorrent made with Vue.js!
### Manual

- Visit the [Releases](https://github.com/WDaan/VueTorrent/releases) page!
- Download the latest `release.zip`
- Download the latest `vuetorrent.zip`
- Unzip the downloaded file
- Point your alternate WebUI location to the `vuetorrent` folder in qBittorrent settings

### From Source

- Head to the [`latest_release`](https://github.com/WDaan/VueTorrent/tree/latest-release) branch
- Head to the [`latest-release`](https://github.com/WDaan/VueTorrent/tree/latest-release) branch
- Clone branch using
- `git clone --single-branch --branch latest-release https://github.com/WDaan/VueTorrent.git`
- Pull changes every once in a while, using `git pull`
Expand Down
29 changes: 0 additions & 29 deletions precompile-release.sh

This file was deleted.

0 comments on commit d217627

Please sign in to comment.