mirror of
https://github.com/smartfrigde/armcord.git
synced 2024-08-14 23:56:58 +00:00
85 lines
2.2 KiB
YAML
85 lines
2.2 KiB
YAML
name: Electron 22 build
|
|
on:
|
|
push:
|
|
branches:
|
|
- win7
|
|
|
|
env:
|
|
FORCE_COLOR: true
|
|
|
|
jobs:
|
|
build-legacywindows:
|
|
runs-on: windows-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v2
|
|
|
|
- uses: pnpm/action-setup@v2 # Install pnpm using packageManager key in package.json
|
|
|
|
- name: Use Node.js 18
|
|
uses: actions/setup-node@v2
|
|
with:
|
|
node-version: 18
|
|
cache: "pnpm"
|
|
|
|
- name: Install Node dependencies
|
|
run: pnpm install -g cargo-cp-artifact && pnpm install
|
|
|
|
- name: Install Electron-Builder
|
|
run: pnpm install -g electron-builder
|
|
|
|
- name: Install Electron 22
|
|
run: pnpm install electron@v22.3.27
|
|
|
|
- name: Replace the version number
|
|
run: (Get-Content src/utils.ts) -replace "\d\.\d\.\d", "DEV" | Out-File src/utils.ts
|
|
|
|
- name: Build
|
|
run: npm run build && electron-builder --windows zip
|
|
|
|
- name: Upload artifact
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: ArmCordLegacyWindows
|
|
path: dist/ArmCord-3.3.0-win.zip
|
|
|
|
|
|
release:
|
|
runs-on: ubuntu-latest
|
|
needs: [build-legacywindows]
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v2
|
|
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: ArmCordLegacyWindows
|
|
path: windows
|
|
- name: Rename E22 zip
|
|
run: mv windows/ArmCord-3.3.0-win.zip windows/ArmCord-3.3.0-win7.zip
|
|
|
|
- name: Get some values needed for the release
|
|
id: vars
|
|
shell: bash
|
|
run: |
|
|
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
|
|
|
|
- uses: dev-drprasad/delete-tag-and-release@v0.2.1
|
|
with:
|
|
delete_release: true
|
|
tag_name: e22
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Create the release
|
|
uses: softprops/action-gh-release@v1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
tag_name: e22
|
|
name: Legacy Windows Build ${{ steps.vars.outputs.sha_short }}
|
|
draft: false
|
|
prerelease: true
|
|
body_path: .github/win7.md
|
|
files: |
|
|
windows/ArmCord-3.3.0-win7.zip
|