mirror of
https://github.com/darksaid98/oxmysql.git
synced 2026-12-01 14:38:50 +00:00
Links root and ui packages together, running `pnpm i` in the root folder will also install deps in the ui folder, same with the build script.
60 lines
1.4 KiB
YAML
60 lines
1.4 KiB
YAML
name: Release
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v*'
|
|
|
|
jobs:
|
|
create-release:
|
|
name: Build and Create Tagged Release
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Install archive tools
|
|
run: sudo apt install zip
|
|
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
ref: ${{ github.ref }}
|
|
- uses: pnpm/[email protected]
|
|
with:
|
|
version: 6.20.3
|
|
|
|
- name: Setup node
|
|
uses: actions/setup-node@v2
|
|
with:
|
|
node-version: 16.x
|
|
cache: 'pnpm'
|
|
|
|
- name: Set env
|
|
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
|
|
|
|
- name: Install dependencies
|
|
run: pnpm i
|
|
|
|
- name: Run build
|
|
run: pnpm build
|
|
|
|
- name: Bundle files
|
|
run: |
|
|
mkdir -p ./temp/oxmysql
|
|
mkdir -p ./temp/oxmysql/ui/
|
|
cp ./{LICENSE,README.md,fxmanifest.lua,ui.lua} ./temp/oxmysql
|
|
cp -r ./{lib,dist} ./temp/oxmysql
|
|
cp -r ./ui/build ./temp/oxmysql/ui/
|
|
cd ./temp && zip -r ../oxmysql.zip ./oxmysql
|
|
|
|
- name: Create Release
|
|
uses: 'marvinpinto/[email protected]'
|
|
id: auto_release
|
|
with:
|
|
repo_token: '${{ secrets.GITHUB_TOKEN }}'
|
|
title: ${{ env.RELEASE_VERSION }}
|
|
prerelease: false
|
|
files: oxmysql.zip
|
|
|
|
env:
|
|
CI: false
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|