Release Electron-app 1.2.1-rc.23 #28
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ************************** | |
# WORK ON PATH BEFORE TRY ! | |
# ADD RELEASE-IT | |
# ************************** | |
name: Release Electron app | |
on: | |
release: | |
types: [released, prereleased] | |
workflow_dispatch: | |
# inputs: | |
# release_type: | |
# type: choice | |
# description: "Update Major, Minor, Patch or RC (prerealse)" | |
# required: true | |
# options: | |
# - -- --preRelease=rc | |
# - -- patch | |
# - -- minor | |
# - -- major | |
# default: -- --preRelease=rc | |
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 }} | |
build: | |
# needs: release_it | |
strategy: | |
matrix: | |
os: | |
[ | |
{ name: 'linux', image: 'ubuntu-latest' }, | |
{ name: 'windows', image: 'windows-latest' }, | |
{ name: 'macos', image: 'macos-latest' }, | |
] | |
runs-on: ${{ matrix.os.image }} | |
steps: | |
- name: Github checkout | |
uses: actions/checkout@v3 | |
- name: Use Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- name: Cache node modules | |
uses: actions/cache@v2 | |
with: | |
path: 'node_modules' | |
key: ${{ runner.os }}-modules-${{ hashFiles('package-lock.lock') }} | |
restore-keys: | | |
${{ runner.os }}-modules- | |
- run: npm i | |
- name: Debug token | |
run: echo ${GITHUB_TOKEN:0:3} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Debug APPLE_ID | |
run: echo ${APPLE_ID:0:3} | |
env: | |
APPLE_ID: ${{ secrets.APPLE_ID }} | |
- name: Debug APPLE_PASSWORD | |
run: echo ${APPLE_PASSWORD:0:3} | |
env: | |
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }} | |
- name: Debug APPLE_TEAM_ID | |
run: echo ${APPLE_TEAM_ID:0:3} | |
env: | |
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} | |
- name: setup appdmg | |
if: matrix.os.image == 'macos-latest' | |
run: npm install -g appdmg | |
# - name: reinstall appdmg | |
# if: matrix.os.image == 'macos-latest' | |
# # https://github.com/actions/runner-images/issues/8796 | |
# run: npm uninstall -g appdmg && npm install -g appdmg | |
- name: Add MacOS certs | |
if: matrix.os.image == 'macos-latest' | |
run: chmod +x add-osx-cert.sh && ./add-osx-cert.sh | |
env: | |
CERTIFICATE_OSX_APPLICATION: ${{ secrets.APPLE_APPLICATION_CERT }} | |
CERTIFICATE_PASSWORD: ${{ secrets.APPLE_APPLICATION_CERT_PASSWORD }} | |
- name: setup python | |
if: matrix.os.image == 'macos-latest' | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.12 | |
- name: setup appdmg | |
if: matrix.os.image == 'macos-latest' | |
run: | | |
python3 -m pip install setuptools | |
npm install -g appdmg@0.6.6 | |
- name: Make app | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
APPLE_ID: ${{ secrets.APPLE_ID }} | |
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }} | |
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} | |
APPLE_APPLICATION_CERT: ${{ secrets.APPLE_APPLICATION_CERT }} | |
KEY_PASSWORD: ${{ secrets.APPLE_APPLICATION_CERT_PASSWORD }} | |
DEBUG: '@electron/osx-sign,electron-forge:*' | |
run: npm run make:ci | |
- name: Generate Release.txt | |
run: echo ${{ github.sha }} > Release.txt | |
- name: package.json info | |
id: info | |
uses: jaywcjlove/github-action-package@main | |
with: | |
path: electron-app/ecoindex-app/package.json | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
prerelease: true | |
name: Release Electron-app ${{ steps.info.outputs.version }} | |
tag_name: electron-v${{ steps.info.outputs.version }} | |
files: | | |
electron-app/ecoindex-app/Release.txt | |
electron-app/ecoindex-app/out/**/*.deb | |
electron-app/ecoindex-app/out/**/*.dmg | |
electron-app/ecoindex-app/out/**/*Setup.exe | |
electron-app/ecoindex-app/out/**/*.rpm | |
electron-app/ecoindex-app/out/**/*.zip |