mirror of
https://github.com/gnmyt/myspeed.git
synced 2026-01-05 12:39:40 -06:00
45 lines
1.4 KiB
YAML
45 lines
1.4 KiB
YAML
name: Upload the latest release
|
|
|
|
on:
|
|
push:
|
|
branches: [ release ]
|
|
|
|
jobs:
|
|
create:
|
|
name: "Creates the newest release by version"
|
|
runs-on: "ubuntu-latest"
|
|
|
|
steps:
|
|
- name: Checkout project
|
|
uses: actions/checkout@v2.3.4
|
|
|
|
- name: Setup node
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: '16'
|
|
|
|
- run: cd client && npm install --force
|
|
- run: npm run build && mv client/build . && npm install --force
|
|
|
|
- name: Get version
|
|
id: get_version
|
|
run: echo "::set-output name=version::$(jq .version package.json --raw-output)"
|
|
|
|
- name: Install zip
|
|
run: sudo apt-get install zip
|
|
|
|
- name: Zip all files
|
|
run: zip -r MySpeed-${{ steps.get_version.outputs.version }}-with-modules.zip build node_modules server package.json package-lock.json
|
|
|
|
- name: Zip all files (without node_modules)
|
|
run: zip -r MySpeed-${{ steps.get_version.outputs.version }}-without-modules.zip build server package.json package-lock.json
|
|
|
|
- uses: "marvinpinto/action-automatic-releases@latest"
|
|
with:
|
|
repo_token: "${{ secrets.GITHUB_TOKEN }}"
|
|
automatic_release_tag: ${{ steps.get_version.outputs.version }}
|
|
prerelease: false
|
|
title: Release ${{ steps.get_version.outputs.version }}
|
|
files: |
|
|
./MySpeed-*-with-modules.zip
|
|
./MySpeed-*-without-modules.zip |