From 14a4505cb039c116d73fcc58dbf6f1d102d51e9b Mon Sep 17 00:00:00 2001 From: Renaud Heluin Date: Sat, 3 Aug 2024 00:10:16 +0200 Subject: [PATCH] feat: publish mac localy and publish linux and Windows on Github (manually) --- .github/workflows/release.yml | 40 +++++++++---------- .../ecoindex-app/.local.release-it.json | 34 ++++++++++++++++ electron-app/ecoindex-app/package.json | 8 ++-- 3 files changed, 58 insertions(+), 24 deletions(-) create mode 100644 electron-app/ecoindex-app/.local.release-it.json diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2f20b93..fd5d80b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,28 +24,28 @@ defaults: run: working-directory: electron-app/ecoindex-app jobs: - release_it: - runs-on: ubuntu-latest - steps: - - name: Github checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - name: Use Node.js - uses: actions/setup-node@v3 - with: - node-version: 20 - - name: git config - run: | - git config user.name "${GITHUB_ACTOR}" - git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" - - run: npm ci - - run: npm run release:ci ${{ github.event.inputs.release_type }} - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # release_it: + # runs-on: ubuntu-latest + # steps: + # - name: Github checkout + # uses: actions/checkout@v3 + # with: + # fetch-depth: 0 + # - name: Use Node.js + # uses: actions/setup-node@v3 + # with: + # node-version: 20 + # - name: git config + # run: | + # git config user.name "${GITHUB_ACTOR}" + # git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" + # - run: npm ci + # - run: npm run release:ci ${{ github.event.inputs.release_type }} + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} build: - needs: release_it + # needs: release_it strategy: matrix: os: diff --git a/electron-app/ecoindex-app/.local.release-it.json b/electron-app/ecoindex-app/.local.release-it.json new file mode 100644 index 0000000..3f00391 --- /dev/null +++ b/electron-app/ecoindex-app/.local.release-it.json @@ -0,0 +1,34 @@ +{ + "$schema": "https://unpkg.com/release-it/schema/release-it.json", + "git": { + "commitMessage": "chore: release v${version}", + "tagName": "electron-v${version}" + }, + "github": { + "release": true, + "autoGenerate": true, + "releaseName": "Release Electron-app ${version}", + "assets": [ + "./out/make/zip/darwin/arm64/*.zip", + "./out/make/zip/darwin/x64/*.zip", + "./out/make/*.dmg" + ] + }, + "npm": { + "publish": false + }, + "hooks": { + "before:bump": "rm -rf ./out", + "after:bump": "sh make.sh", + "after:git:release": "echo After git push, before github release", + "after:release": "echo Successfully released ${name} v${version} to ${repo.repository}." + }, + "plugins": { + "@release-it/conventional-changelog": { + "preset": { + "name": "angular" + }, + "infile": "CHANGELOG.md" + } + } +} diff --git a/electron-app/ecoindex-app/package.json b/electron-app/ecoindex-app/package.json index f1bbf07..27324b1 100644 --- a/electron-app/ecoindex-app/package.json +++ b/electron-app/ecoindex-app/package.json @@ -45,10 +45,10 @@ "publish": "env-cmd electron-forge publish", "publish:ci": "electron-forge publish", "lint": "eslint --ext .ts,.tsx .", - "release": "env-cmd release-it --preRelease=rc", - "release:patch": "env-cmd release-it", - "release:minor": "env-cmd release-it minor", - "release:major": "env-cmd release-it major", + "release:local": "env-cmd release-it --preRelease=rc --config .local.release-it.json", + "release:local:patch": "env-cmd release-it --config .local.release-it.json", + "release:local:minor": "env-cmd release-it minor --config .local.release-it.json", + "release:local:major": "env-cmd release-it major --config .local.release-it.json", "release:ci": "release-it" }, "devDependencies": {