2022-11-22 16:25:46 +00:00
|
|
|
name: Dev build
|
2022-12-31 14:53:23 +00:00
|
|
|
on:
|
2022-11-22 16:25:46 +00:00
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- dev
|
|
|
|
|
|
|
|
env:
|
|
|
|
FORCE_COLOR: true
|
|
|
|
|
|
|
|
jobs:
|
2022-12-31 14:53:23 +00:00
|
|
|
build-linux:
|
|
|
|
runs-on: ubuntu-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: Replace the version number
|
|
|
|
run: cat src/utils.ts | sed -e 's/[[:digit:]]\.[[:digit:]]\.[[:digit:]]/DEV/g' | tee src/utils.ts > /dev/null
|
|
|
|
|
|
|
|
- name: Build
|
|
|
|
run: npm run build && electron-builder --linux zip && electron-builder --arm64 --linux zip
|
|
|
|
|
|
|
|
- name: Upload artifact
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: ArmCordLinux.zip
|
2023-07-18 18:55:37 +00:00
|
|
|
path: dist/ArmCord-3.3.0.zip
|
2022-12-31 14:53:23 +00:00
|
|
|
- name: Upload artifact
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: ArmCordLinuxArm64.zip
|
2023-07-18 18:55:37 +00:00
|
|
|
path: dist/ArmCord-3.3.0-arm64.zip
|
2022-12-31 14:53:23 +00:00
|
|
|
build-snap:
|
|
|
|
runs-on: ubuntu-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: Replace the version number
|
|
|
|
run: cat src/utils.ts | sed -e 's/[[:digit:]]\.[[:digit:]]\.[[:digit:]]/DEV/g' | tee src/utils.ts > /dev/null
|
|
|
|
|
|
|
|
- name: Build
|
|
|
|
run: npm run build && electron-builder --linux snap --config.snap.grade=devel
|
|
|
|
|
|
|
|
- uses: snapcore/action-publish@v1
|
|
|
|
env:
|
|
|
|
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAP_STORE_LOGIN }}
|
|
|
|
with:
|
2023-07-18 18:55:37 +00:00
|
|
|
snap: dist/ArmCord_3.3.0_amd64.snap
|
2022-12-31 14:53:23 +00:00
|
|
|
release: edge
|
|
|
|
build-windows:
|
|
|
|
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: 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: ArmCordWindows.zip
|
2023-07-18 18:55:37 +00:00
|
|
|
path: dist/ArmCord-3.3.0-win.zip
|
2022-12-31 14:53:23 +00:00
|
|
|
build-windowsOnARM:
|
|
|
|
runs-on: windows-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/setup-node@v3
|
|
|
|
with:
|
|
|
|
node-version: '18'
|
|
|
|
|
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Set architecture
|
|
|
|
run: set npm_config_arch=arm64
|
|
|
|
|
|
|
|
- uses: pnpm/action-setup@v2 # Install pnpm using packageManager key in package.json
|
|
|
|
|
|
|
|
- name: Install Node dependencies
|
|
|
|
run: pnpm install -g cargo-cp-artifact && pnpm install
|
|
|
|
|
|
|
|
- name: Install Electron-Builder
|
|
|
|
run: pnpm install -g electron-builder
|
|
|
|
|
|
|
|
- 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 --arm64
|
|
|
|
env:
|
|
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Upload artifact
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: ArmCordWindowsArm64.zip
|
2023-07-18 18:55:37 +00:00
|
|
|
path: dist\ArmCord-3.3.0-arm64-win.zip
|
2022-12-31 14:53:23 +00:00
|
|
|
|
|
|
|
release:
|
|
|
|
runs-on: ubuntu-latest
|
2024-04-28 14:58:48 +00:00
|
|
|
needs: [build-linux, build-windows, build-windowsOnARM]
|
2022-12-31 14:53:23 +00:00
|
|
|
steps:
|
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- uses: actions/download-artifact@v2
|
|
|
|
with:
|
|
|
|
name: ArmCordWindows.zip
|
|
|
|
path: windows
|
|
|
|
|
|
|
|
- uses: actions/download-artifact@v2
|
|
|
|
with:
|
|
|
|
name: ArmCordLinux.zip
|
|
|
|
path: linux
|
|
|
|
|
|
|
|
- uses: actions/download-artifact@v2
|
|
|
|
with:
|
|
|
|
name: ArmCordLinuxArm64.zip
|
|
|
|
path: linux
|
|
|
|
- uses: actions/download-artifact@v2
|
|
|
|
with:
|
|
|
|
name: ArmCordWindowsArm64.zip
|
|
|
|
path: windows
|
|
|
|
|
|
|
|
- name: Get some values needed for the release
|
|
|
|
id: vars
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
|
|
|
|
|
2023-04-25 09:08:13 +00:00
|
|
|
- uses: dev-drprasad/delete-tag-and-release@v0.2.1
|
2022-12-31 14:53:23 +00:00
|
|
|
with:
|
|
|
|
delete_release: true
|
|
|
|
tag_name: devbuild
|
|
|
|
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: devbuild
|
|
|
|
name: Dev Build ${{ steps.vars.outputs.sha_short }}
|
|
|
|
draft: false
|
|
|
|
prerelease: true
|
|
|
|
body_path: .github/release.md
|
|
|
|
files: |
|
2023-07-18 18:55:37 +00:00
|
|
|
linux/ArmCord-3.3.0.zip
|
|
|
|
linux/ArmCord-3.3.0-arm64.zip
|
|
|
|
windows/ArmCord-3.3.0-win.zip
|
|
|
|
windows/ArmCord-3.3.0-arm64-win.zip
|