VueTorrent/.github/workflows/release.yml
dependabot[bot] f30a5a1053
chore(deps): bump JamesIves/github-pages-deploy-action (#876)
Bumps [JamesIves/github-pages-deploy-action](https://github.com/jamesives/github-pages-deploy-action) from 3.7.1 to 4.4.2.
- [Release notes](https://github.com/jamesives/github-pages-deploy-action/releases)
- [Commits](https://github.com/jamesives/github-pages-deploy-action/compare/3.7.1...v4.4.2)

---
updated-dependencies:
- dependency-name: JamesIves/github-pages-deploy-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-23 09:36:27 +02:00

83 lines
2.7 KiB
YAML

name: Build release
on:
push:
branches:
- master
jobs:
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@v3
- name: Run release please
uses: google-github-actions/release-please-action@v3.7.4
id: release
with:
token: ${{ secrets.GITHUB_TOKEN }}
release-type: node
package-name: vuetorrent
changelog-types:
'[{"type":"feat","section":"Features","hidden":false},{"type":"fix","section":"Bug Fixes","hidden":false},{"type":"perf","section":"Improvements","hidden":false}]'
upload-release:
needs: setup-release
if: ${{ needs.setup-release.outputs.release_created }}
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Build Node.js cache
uses: actions/cache@v3
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@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Build Node.js cache
uses: actions/cache@v3
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@v4.4.2
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: latest-release
FOLDER: ./vuetorrent