Merge pull request #1 from ciis0/ciis0/update #16
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish Binaries | |
on: | |
workflow_dispatch: | |
push: | |
tags: | |
- '*' | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
jobs: | |
build-electron-windows: | |
runs-on: windows-latest | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: $(( ${{ github.event_name == 'pull_request' && github.event.pull_request.commits || 0 }} + 10 )) | |
- name: Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- name: Build UI | |
working-directory: . | |
env: | |
NODE_OPTIONS: "--max_old_space_size=6144" | |
run: | | |
npm version from-git --allow-same-version --no-git-tag-version --workspaces --include-workspace-root --no-workspaces-update | |
$version=$(npm pkg get version | convertfrom-json) | |
npm ci | |
npm run app-package | |
Compress-Archive -Path packages\insomnia\dist\win-unpacked\* -DestinationPath rest.ground-"$version".zip | |
- name: Archive Portable | |
uses: actions/upload-artifact@v4 | |
with: | |
name: portable | |
path: |- | |
packages/insomnia/dist/*.exe | |
- name: Archive Installer | |
uses: actions/upload-artifact@v4 | |
with: | |
name: installer | |
path: |- | |
packages/insomnia/dist/squirrel-windows/*.exe | |
- name: Archive ZIP | |
uses: actions/upload-artifact@v4 | |
with: | |
name: zip | |
path: |- | |
./*.zip | |
- name: Publish | |
uses: ncipollo/release-action@v1 | |
if: ${{ startsWith(github.ref, 'refs/tags/') }} | |
with: | |
artifacts: "packages/insomnia/dist/*.exe,packages/insomnia/dist/squirrel-windows/*.exe,./*.zip" | |
allowUpdates: true | |
updateOnlyUnreleased: true |