Skip to content

Build Release

Build Release #5

Workflow file for this run

name: Build Release
on:
push:
branches:
- master
workflow_dispatch:
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ''
- name: Install dependencies
run: npm ci
- name: Build project
run: npm run build
- uses: nyaa8/package-version@v1
with:
path: 'package.json'
follow-symlinks: 'false'
- name: Zip dist
run: |
TAG_NAME=${{ env.PACKAGE_VERSION }}
FILE_NAME=autopcr_web_vue-release_${TAG_NAME}.zip
echo "filename=${FILE_NAME}" >> $GITHUB_ENV
cd dist && zip -r ../${FILE_NAME} .
- name: Release
uses: softprops/action-gh-release@v2
with:
name: Release-v${{ env.PACKAGE_VERSION }}
tag_name: v${{ env.PACKAGE_VERSION }}
files: ${{ env.FILE_NAME }}
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}