mirror of
https://github.com/OpenFusionProject/Client.git
synced 2024-11-22 05:30:05 +00:00
Introduce automatic artifact building and publishing
This commit is contained in:
parent
2183106c73
commit
01ee292d10
47
.github/workflows/build.yml
vendored
Normal file
47
.github/workflows/build.yml
vendored
Normal file
@ -0,0 +1,47 @@
|
||||
name: Publish Build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: windows-2022
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set up Node.js 20.x
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 20.x
|
||||
cache: 'npm'
|
||||
- name: Install dependencies
|
||||
run: npm install
|
||||
- name: Pack into zip and create installer
|
||||
run: npm run dist
|
||||
- name: Upload Artifacts
|
||||
uses: actions/upload-artifact@master
|
||||
with:
|
||||
path: dist
|
||||
|
||||
publish-release:
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
|
||||
steps:
|
||||
- name: Download artifact
|
||||
uses: actions/download-artifact@master
|
||||
- name: Unzip artifact
|
||||
run: unzip artifact.zip
|
||||
- name: Create release
|
||||
uses: ncipollo/release-action@v1
|
||||
with:
|
||||
artifacts: "*-ia32-win.zip,*.exe"
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
@ -7,7 +7,7 @@
|
||||
"postinstall": "npx patch-package && npm explore electron-prebuilt -- npm run postinstall",
|
||||
"start": "electron .",
|
||||
"pack": "electron-builder --win --ia32 --dir",
|
||||
"dist": "electron-builder --win --ia32",
|
||||
"dist": "electron-builder --win --ia32 --publish=never",
|
||||
"prettier": "npx prettier --write ."
|
||||
},
|
||||
"author": "OpenFusion Contributors",
|
||||
|
Loading…
Reference in New Issue
Block a user