Skip to content

SDK Rewrite (#14)

SDK Rewrite (#14) #31

Workflow file for this run

name: Deployment
on:
push:
tags: "v*"
jobs:
release:
name: Build and create release
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Get tag
run: echo ::set-output name=VERSION_TAG::${GITHUB_REF/refs\/tags\//}
id: get_tag
- name: Checkout
uses: actions/checkout@v3
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 14
- uses: pnpm/action-setup@v2
name: Install pnpm
id: pnpm-install
with:
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install --no-frozen-lockfile
- name: Build project
run: pnpm run build
- name: Bundle built files
run: |
mkdir -p ./temp/fmsdk
cp ./{README.md,LICENSE,fxmanifest.lua,config.schema.json,config.json} ./temp/fmsdk
cp -r ./dist ./temp/fmsdk/dist
cd ./temp && zip -r ../fmsdk.zip ./fmsdk
- name: Create Release
uses: softprops/action-gh-release@v1
with:
token: ${{ secrets.FIVEMANAGE_WORKFLOW }}
name: Fivemanage SDK | ${{ steps.get_tag.outputs.VERSION_TAG }}
prerelease: false
files: fmsdk.zip
env:
CI: false
GITHUB_TOKEN: ${{ secrets.FIVEMANAGE_WORKFLOW }}