From a31bf6b573cfee62acb7626ffeeac47c7fe30f2c Mon Sep 17 00:00:00 2001 From: shrutiburman <87537688+shrutiburman@users.noreply.github.com> Date: Thu, 29 Dec 2022 14:52:36 +0530 Subject: [PATCH] fix: macos workflow fix (#484) --- .github/scripts/pack_macos.sh | 5 +-- .../workflows/macos-executable-release.yml | 27 +++++++------- .releaserc.json | 35 +++++++++++-------- Makefile | 2 +- 4 files changed, 38 insertions(+), 31 deletions(-) diff --git a/.github/scripts/pack_macos.sh b/.github/scripts/pack_macos.sh index 7183c2917..1ad19976d 100644 --- a/.github/scripts/pack_macos.sh +++ b/.github/scripts/pack_macos.sh @@ -48,8 +48,9 @@ pack_macos() { # if [ "$REPOSITORY_OWNER" == "twilio" ] # then import_certificate - npx oclif pack:macos - notarize_and_staple "$FILE_PATH_ARM64" + #npx oclif pack:macos + npx oclif-dev pack:macos +# notarize_and_staple "$FILE_PATH_ARM64" notarize_and_staple "$FILE_PATH_X64" # else # npx oclif pack:macos diff --git a/.github/workflows/macos-executable-release.yml b/.github/workflows/macos-executable-release.yml index ec504f655..66a837bc3 100644 --- a/.github/workflows/macos-executable-release.yml +++ b/.github/workflows/macos-executable-release.yml @@ -40,28 +40,29 @@ jobs: APPLE_ID: ${{ secrets.APPLE_ID}} APPLE_ID_APP_PASSWORD: ${{ secrets.APPLE_ID_APP_PASSWORD}} APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID}} - FILE_PATH_ARM64: dist/macos/${{ github.event.inputs.formula }}-v${{ needs.get-tag.outputs.TAG_NAME }}-${{ needs.get-sha.outputs.SHA_SHORT }}-arm64.pkg - FILE_PATH_X64: dist/macos/${{ github.event.inputs.formula }}-v${{ needs.get-tag.outputs.TAG_NAME }}-${{ needs.get-sha.outputs.SHA_SHORT }}-x64.pkg +# FILE_PATH_ARM64: dist/macos/${{ github.event.inputs.formula }}-v${{ needs.get-tag.outputs.TAG_NAME }}-${{ needs.get-sha.outputs.SHA_SHORT }}-arm64.pkg + FILE_PATH_X64: dist/macos/${{ github.event.inputs.formula }}-v${{ needs.get-tag.outputs.TAG_NAME }}.pkg REPOSITORY_OWNER: ${{ github.repository_owner }} - - name: Upload binaries to release - arm64 - if: always() - run: node .github/scripts/update-platform-executables.js - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - FILE: dist/macos/${{ github.event.inputs.formula }}-v${{ needs.get-tag.outputs.TAG_NAME }}-${{ needs.get-sha.outputs.SHA_SHORT }}-arm64.pkg - ASSET_NAME: ${{ github.event.inputs.formula }}-${{ needs.get-tag.outputs.TAG_NAME }}-arm64.pkg - TAG_NAME: ${{ needs.get-tag.outputs.TAG_NAME }} - REPO_NAME: ${{ github.repository }} +# TODO: enable these when oclif pack : macos starts working fine +# - name: Upload binaries to release - arm64 +# if: always() +# run: node .github/scripts/update-platform-executables.js +# env: +# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} +# FILE: dist/macos/${{ github.event.inputs.formula }}-v${{ needs.get-tag.outputs.TAG_NAME }}-${{ needs.get-sha.outputs.SHA_SHORT }}-arm64.pkg +# ASSET_NAME: ${{ github.event.inputs.formula }}-${{ needs.get-tag.outputs.TAG_NAME }}-arm64.pkg +# TAG_NAME: ${{ needs.get-tag.outputs.TAG_NAME }} +# REPO_NAME: ${{ github.repository }} - name: Upload binaries to release - x64 if: always() run: | node .github/scripts/update-platform-executables.js env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - FILE: dist/macos/${{ github.event.inputs.formula }}-v${{ needs.get-tag.outputs.TAG_NAME }}-${{ needs.get-sha.outputs.SHA_SHORT }}-x64.pkg + FILE: dist/macos/${{ github.event.inputs.formula }}-v${{ needs.get-tag.outputs.TAG_NAME }}.pkg ASSET_NAME: ${{ github.event.inputs.formula }}-${{ needs.get-tag.outputs.TAG_NAME }}-x64.pkg TAG_NAME: ${{ needs.get-tag.outputs.TAG_NAME }} - REPO_NAME: ${{ github.repository }} + REPO_NAME: ${{ github.repository }} notify-complete-fail: diff --git a/.releaserc.json b/.releaserc.json index bce9234ee..dd7cd8f8c 100644 --- a/.releaserc.json +++ b/.releaserc.json @@ -15,16 +15,20 @@ "@semantic-release/commit-analyzer", { "preset": "angular", - "releaseRules": [{ - "type": "chore", - "release": "patch" - },{ - "type": "oaiFix", - "release": "patch" - },{ - "type": "oaiFeat", - "release": "minor" - }] + "releaseRules": [ + { + "type": "chore", + "release": "patch" + }, + { + "type": "oaiFix", + "release": "patch" + }, + { + "type": "oaiFeat", + "release": "minor" + } + ] } ], [ @@ -32,10 +36,11 @@ { "preset": "conventionalcommits", "presetConfig": { - "types": [{ - "type": "feat", - "section": "Library - Features" - }, + "types": [ + { + "type": "feat", + "section": "Library - Features" + }, { "type": "fix", "section": "Library - Fixes" @@ -62,7 +67,7 @@ "changelogFile": "CHANGES.md" } ], - "@semantic-release/npm", + "@semantic-release/npm", [ "@semantic-release/github", { diff --git a/Makefile b/Makefile index d91c6a7c6..e6e7b3ba2 100644 --- a/Makefile +++ b/Makefile @@ -28,5 +28,5 @@ docker-push: # make owner=username generate-fork-pipeline-changes generate-fork-pipeline-changes: - git co main + git checkout main node .github/scripts/create-fork-pipeline-changes.js $(PWD) $(owner)