Skip to content

fix if no printersinfo #20

fix if no printersinfo

fix if no printersinfo #20

Workflow file for this run

name: Build and release
on:
push:
branches:
- main
env:
YARN_ENABLE_IMMUTABLE_INSTALLS: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 18
- run: yarn
- name: Build
run: yarn build
release:
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 18
- run: yarn
- name: Build
run: yarn build:pkg
- name: Copy Origin Bundle to Dist
run: cp dist/xcpc-tools.js /tmp/xcpc-tools-bundle.js
- name: Create Zip for Windows
run: zip -r /tmp/xcpc-tools-win.zip dist/pkg/xcpc-tools-win.exe
- name: Create Tar for MacOS
run: tar -czvf /tmp/xcpc-tools-macos.tar.gz dist/pkg/xcpc-tools-macos
- name: Create Tar for Linux
run: tar -czvf /tmp/xcpc-tools-linux.tar.gz dist/pkg/xcpc-tools-linux
- name: Get release version and commit
id: tag
run: |
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
echo "::set-output name=version::$(node -p "require('./packages/server/package.json').version")"
- name: Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ steps.tag.outputs.version }}-${{ steps.tag.outputs.sha_short }}
files: |
/tmp/xcpc-tools-bundle.js
/tmp/xcpc-tools-win.zip
/tmp/xcpc-tools-macos.tar.gz
/tmp/xcpc-tools-linux.tar.gz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}