From 1f01ae67dd5bdd0122cd520f16b357eada9a271c Mon Sep 17 00:00:00 2001 From: smartfrigde <37928912+smartfrigde@users.noreply.github.com> Date: Tue, 19 Apr 2022 20:13:46 +0200 Subject: [PATCH] Add dev build CI --- .github/release.md | 2 ++ .github/workflows/dev.yml | 57 +++++++++++++++++++++++++++++++++++++++ package.json | 1 + 3 files changed, 60 insertions(+) create mode 100644 .github/release.md create mode 100644 .github/workflows/dev.yml diff --git a/.github/release.md b/.github/release.md new file mode 100644 index 0000000..639ec3e --- /dev/null +++ b/.github/release.md @@ -0,0 +1,2 @@ +# Thanks for checking out ArmCord dev build! +Make sure to join our [Discord server](https://discord.gg/uaW5vMY3V6) to share opinions, or to chat with ArmCord developers! \ No newline at end of file diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml new file mode 100644 index 0000000..7de6e45 --- /dev/null +++ b/.github/workflows/dev.yml @@ -0,0 +1,57 @@ +name: Dev build +on: [push] +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: '18' + - run: npm install + - id: vars + shell: bash + run: | + echo "::set-output name=sha_short::$(git rev-parse --short HEAD)" + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ steps.vars.outputs.sha_short }} + release_name: Release ${{ steps.vars.outputs.sha_short }} + draft: true + prerelease: true + body_path: ./.github/release.md + - uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: /home/runner/work/ArmCord/ArmCord/dist/ArmCord-3.1.0.zip + asset_name: ArmCordLinux.zip + asset_content_type: application/octet-stream + - uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: /home/runner/work/ArmCord/ArmCord/dist/ArmCord-3.1.0-win.zip + asset_name: ArmCordWindows.zip + asset_content_type: application/octet-stream + - uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: /home/runner/work/ArmCord/ArmCord/dist/ArmCord-3.1.0-mac.zip + asset_name: ArmCordWindows.zip + asset_content_type: application/octet-stream + - run: | + curl --request PATCH \ + -H "Accept: application/vnd.github.v3+json" \ + -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \ + -H "Content-Type: application/json" \ + https://api.github.com/repos/${{ github.repository }}/releases/${{steps.create_release.outputs.id}} \ + -d '{"draft":false}' \ No newline at end of file diff --git a/package.json b/package.json index c121ac4..4d66138 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,7 @@ "start": "npm run build && electron ./ts-out/main.js", "package": "npm run build && electron-builder", "format": "prettier --write src/**/*", + "CIbuild": "npm run build && electron-builder --linux zip && electron-builder --windows zip && electron-builder --macos zip", "postinstall": "husky install" }, "repository": {