Compare commits

...

25 commits

Author SHA1 Message Date
smartfrigde
6d951db41d Fix icon generating incorrectly on Debian 2022-06-01 21:58:08 +02:00
theofficialgman
b933ea5580
Fix releases (#127)
* Update build.yml

* Update build.yml

* Update build.yml

* Update build.yml
2022-05-31 21:33:42 +02:00
smartfrigde
89df58c1fe e 2022-05-25 20:03:11 +02:00
smartfridge
b62ee16640
e 2022-05-24 20:01:47 +02:00
smartfrigde
a619bd50a2 ls 2022-05-24 13:45:13 +02:00
smartfrigde
3fd9817d4f I forgor 2022-05-24 12:52:15 +02:00
smartfrigde
00ecd5ab46 Ultimate CI fix 2022-05-24 12:39:14 +02:00
smartfrigde
9aaffec54d Add listing all files in dist dir 2022-05-24 12:03:03 +02:00
smartfrigde
713dee231d f 2022-05-23 21:52:10 +02:00
smartfrigde
c1e60574d4 ugh 2022-05-23 20:56:01 +02:00
smartfrigde
ebaa340814 e 2022-05-23 20:35:49 +02:00
smartfrigde
347916f582 fix 2022-05-23 20:09:10 +02:00
smartfrigde
eb94a4c4c9 fix 2022-05-23 19:43:00 +02:00
smartfrigde
7ca079025f it's getting late 2022-05-23 19:07:14 +02:00
smartfrigde
5d0c29c409 oop 2022-05-23 18:42:57 +02:00
smartfrigde
50f9ded9e7 fix 2022-05-23 18:24:07 +02:00
smartfrigde
bde78e1924 ujgh 2022-05-23 18:15:19 +02:00
smartfrigde
aa76171d34 it turns out, it was powershell all along 2022-05-23 18:08:58 +02:00
smartfrigde
bfd874b9a9 Fix deleting unpacked builds in windowns 2022-05-23 18:03:15 +02:00
smartfrigde
e9afff1d92 Fix removing unpacked builds on Windows 2022-05-23 17:52:36 +02:00
smartfrigde
716cfea120 Burn in hell Bill Gates 2022-05-23 16:58:30 +02:00
smartfrigde
b9fb4837db Add release workflow (pls work) 2022-05-23 16:53:16 +02:00
smartfrigde
0ecabaeb36 v3.0.6 2022-05-23 16:08:49 +02:00
smartfrigde
e3b891e636 Correct the version in AC internals 2022-05-23 16:08:26 +02:00
smartfridge
cdfdbc5e2a
Add the release workflow 2022-05-23 16:07:22 +02:00
5 changed files with 204 additions and 2 deletions

196
.github/workflows/build.yml vendored Normal file
View file

@ -0,0 +1,196 @@
name: Release build
on:
push:
branches:
- stable
env:
FORCE_COLOR: true
jobs:
build-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v3
with:
node-version: '18'
- name: Checkout code
uses: actions/checkout@v2
- name: Install Node dependencies
run: npm install
- name: Install Electron-Builder
run: npm install -g electron-builder
- name: Build
run: npm run build && electron-builder --linux && electron-builder --arm64 --linux && electron-builder --armv7l --linux
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: List all files in the dist directory
run: ls -l dist
- name: Delete unpacked builds
run: rm -rf dist/linux-unpacked && rm -rf dist/linux-arm64-unpacked && rm -rf dist/linux-armv7l-unpacked
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: ArmCordLinux
path: dist/
build-mac:
runs-on: macos-latest
steps:
- uses: actions/setup-node@v3
with:
node-version: '18'
- name: Checkout code
uses: actions/checkout@v2
- name: Install Node dependencies
run: npm install
- name: Install Electron-Builder
run: npm install -g electron-builder
- name: Build
run: npm run build && electron-builder --macos
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: List all files in the dist directory
run: ls -l dist
- name: Delete unpacked builds
run: rm -rf dist/macos-unpacked
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: ArmCordMac
path: dist/
build-windows:
runs-on: windows-latest
steps:
- uses: actions/setup-node@v3
with:
node-version: '18'
- name: Checkout code
uses: actions/checkout@v2
- name: Install Node dependencies
run: npm install
- name: Install Electron-Builder
run: npm install -g electron-builder
- name: Build
run: npm run build && electron-builder --windows
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Delete unpacked builds
run: Remove-Item -LiteralPath ".\dist\win-unpacked" -Force -Recurse
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: ArmCordWindows
path: dist/
release:
runs-on: ubuntu-latest
needs: [build-linux, build-mac, build-windows]
steps:
- uses: actions/download-artifact@v2
with:
name: ArmCordMac
path: macos
- uses: actions/download-artifact@v2
with:
name: ArmCordWindows
path: windows
- uses: actions/download-artifact@v2
with:
name: ArmCordLinux
path: linux
- name: ls
run: ls
- name: Delete unwanted directories
run: rm -rf {linux,macos,windows}/*/
rm -rf {linux,macos,windows}/.icon*
rm -rf {linux,macos,windows}/builder-debug.yml
- name: ls dirs
run: ls linux && ls macos && ls windows
- name: Get some values needed for the release
id: vars
shell: bash
run: |
echo "::set-output name=releaseTag::$(git describe --tags --abbrev=0)"
- uses: dev-drprasad/delete-tag-and-release@v0.2.0
with:
delete_release: true
tag_name: v3.0.6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create Release
uses: actions/github-script@v2
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
console.log('environment', process.versions);
const fs = require('fs').promises;
const { repo: { owner, repo }, sha } = context;
console.log({ owner, repo, sha });
const release = await github.repos.createRelease({
owner, repo,
tag_name: process.env.releaseTag,
draft: true,
target_commitish: sha
});
console.log('created release', { release });
for (let file of await fs.readdir('linux')) {
// do whatever filtering you want here, I'm just uploading all the files
console.log('uploading', file);
await github.repos.uploadReleaseAsset({
owner, repo,
release_id: release.data.id,
name: file,
data: await fs.readFile(`./linux/${file}`)
});
}
for (let file of await fs.readdir('windows')) {
// do whatever filtering you want here, I'm just uploading all the files
console.log('uploading', file);
await github.repos.uploadReleaseAsset({
owner, repo,
release_id: release.data.id,
name: file,
data: await fs.readFile(`./windows/${file}`)
});
}
for (let file of await fs.readdir('macos')) {
// do whatever filtering you want here, I'm just uploading all the files
console.log('uploading', file);
await github.repos.uploadReleaseAsset({
owner, repo,
release_id: release.data.id,
name: file,
data: await fs.readFile(`./macos/${file}`)
});
}
env:
releaseTag: ${{ steps.vars.outputs.releaseTag }}

5
.vscode/settings.json vendored Normal file
View file

@ -0,0 +1,5 @@
{
"yaml.schemas": {
"https://json.schemastore.org/github-workflow.json": "file:///home/smartfridge/Documents/ArmCord/.github/workflows/build.yml"
}
}

BIN
build/icon.icns Normal file

Binary file not shown.

View file

@ -1,6 +1,6 @@
{
"name": "ArmCord",
"version": "3.1.0",
"version": "3.0.6",
"description": "ArmCord is a custom client designed to enhance your Discord experience while keeping everything lightweight.",
"main": "ts-out/main.js",
"scripts": {
@ -44,6 +44,7 @@
"category": "Network"
},
"linux": {
"icon": "build/icon.icns",
"category": "Network",
"maintainer": "smartfrigde@gmail.com",
"target": [

View file

@ -52,7 +52,7 @@ export function setup() {
export function getVersion() {
//to-do better way of doing this
return "3.1.0";
return "3.0.6";
}
export async function injectJS(inject: string) {
const js = await (await fetch(`${inject}`)).text();