Skip to content

Commit

Permalink
fix: fixing semantic-release; Merging changes from my other repo
Browse files Browse the repository at this point in the history
  • Loading branch information
javierguzman committed Jun 27, 2023
1 parent f3425c0 commit a7843f8
Show file tree
Hide file tree
Showing 5 changed files with 86 additions and 195 deletions.
54 changes: 19 additions & 35 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,41 +79,8 @@ jobs:
- name: Install node_modules
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile --network-timeout 300000 # sometimes yarn takes time, therefore, we increase the timeout
- if: runner.os == 'macOS'
name: Setup Apple certificates
env:
APPLE_INSTALLER_CERT_BASE64: ${{ secrets.APPLE_INSTALLER_CERT_BASE64 }}
APPLE_APPLICATION_CERT_BASE64: ${{ secrets.APPLE_APPLICATION_CERT_BASE64 }}
APPLE_CERT_PASSWORD: ${{ secrets.APPLE_CERT_PASSWORD }}
APPLE_KEYCHAIN_PASSWORD: ${{ secrets.APPLE_KEYCHAIN_PASSWORD }}
run: |
APPLE_INSTALLER_CERT_PATH=$RUNNER_TEMP/apple_installer.p12
APPLE_APPLICATION_CERT_PATH=$RUNNER_TEMP/apple_application.p12
KEYCHAIN_PATH=$RUNNER_TEMP/apple-signing.keychain-db
# create certificates from base64
echo -n "$APPLE_INSTALLER_CERT_BASE64" | base64 --decode -o $APPLE_INSTALLER_CERT_PATH
echo -n "$APPLE_APPLICATION_CERT_BASE64" | base64 --decode -o $APPLE_APPLICATION_CERT_PATH
# create keychain stuff
security create-keychain -p "$APPLE_KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
security set-keychain-settings -lut 21600 $KEYCHAIN_PATH
security unlock-keychain -p "$APPLE_KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
#import certificates
echo "Importing installer cert"
security import $APPLE_INSTALLER_CERT_PATH -P "$APPLE_CERT_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
echo "Importing application cert"
security import $APPLE_APPLICATION_CERT_PATH -P "$APPLE_CERT_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
security list-keychain -d user -s $KEYCHAIN_PATH
# - run: yarn run lint
- if: runner.os == 'macOS'
name: Build for MacOS
env:
APPLE_ID: ${{ secrets.APPLEID }}
APPLE_ID_PASSWORD: ${{ secrets.APPLEIDPASS }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
run: yarn run make
- if: runner.os != 'macOS'
name: Build for Linux/Windows
Expand Down Expand Up @@ -143,7 +110,20 @@ jobs:
fail-fast: false

steps:
#- uses: actions/checkout@v3
- name: Setup Nodejs
uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Cache node_modules
id: cache-node-modules
uses: actions/cache@v3
with:
path: node_modules
key: release-${{ hashFiles('package.json', 'yarn.lock') }}
- name: Install node_modules
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile --network-timeout 300000 # sometimes yarn takes time, therefore, we increase the timeout
- uses: actions/download-artifact@v3
with:
name: artifacts
Expand All @@ -166,7 +146,11 @@ jobs:
with:
name: release
path: ${{ github.workspace }}/dist
- name: Log workspace
run: |
ls -R ${{ github.workspace}}
# - name: Run semantic-release
# env:
# GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# run: npx semantic-release --branches main
# run: npx semantic-release
2 changes: 1 addition & 1 deletion .husky/prepare-commit-msg
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

exec < /dev/tty && npx cz --hook || true
test -t 1 && exec < /dev/tty && npx cz --hook || true
14 changes: 9 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
"version": "1.1.3",
"fwVersion": "1.0.9beta",
"description": "Bazecor desktop app",
"private": true,
"repository": {
"type": "git",
"url": "https://github.com/Dygmalab/Bazecor"
"url": "https://github.com/javierguzman/BazecorBlacksmith"
},
"main": ".webpack/main",
"scripts": {
Expand All @@ -17,7 +18,6 @@
"make-win": "electron-forge make --platform win32",
"make-mac": "electron-forge make --platform darwin",
"make-lin": "electron-forge make --platform linux",
"publish": "electron-forge publish",
"lint": "eslint --ext .ts,.tsx,.js,.jsx .",
"prettier": "prettier --write \"./**/*.{js,json,css,scss,md}\"",
"test": "vitest run",
Expand All @@ -35,7 +35,7 @@
"name": "Dygma Lab S.L.",
"email": "[email protected]"
},
"homepage": "https://github.com/Dygmalab/Bazecor",
"homepage": "https://github.com/javierguzman/BazecorBlacksmith",
"engines": {
"node": "^18.16.0",
"npm": ">=8.11.0"
Expand All @@ -55,10 +55,14 @@
"@electron-forge/maker-dmg": "^6.2.1",
"@electron-forge/maker-rpm": "^6.1.1",
"@electron-forge/maker-squirrel": "^6.1.1",
"@electron-forge/maker-zip": "^6.1.1",
"@electron-forge/plugin-webpack": "^6.1.1",
"@electron-forge/publisher-github": "^6.2.1",
"@reforged/maker-appimage": "^3.2.1",
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/commit-analyzer": "^10.0.1",
"@semantic-release/git": "^10.0.1",
"@semantic-release/github": "^9.0.3",
"@semantic-release/npm": "^10.0.4",
"@semantic-release/release-notes-generator": "^11.0.3",
"@types/react": "^18.2.8",
"@types/react-dom": "^18.2.4",
"@types/styled-components": "^5.1.26",
Expand Down
16 changes: 16 additions & 0 deletions release.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
module.exports = {
branches: ["main"],
plugins: [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/changelog",
"@semantic-release/npm",
"@semantic-release/git",
[
"@semantic-release/github",
{
assets: [{ path: "dist/*.exe" }, { path: "dist/*.dmg" }, { path: "dist/*.AppImage" }],
},
],
],
};
Loading

0 comments on commit a7843f8

Please sign in to comment.