Skip to content

Commit

Permalink
fix: macos workflow fix (twilio#484)
Browse files Browse the repository at this point in the history
  • Loading branch information
shrutiburman committed Dec 29, 2022
1 parent 829d229 commit a31bf6b
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 31 deletions.
5 changes: 3 additions & 2 deletions .github/scripts/pack_macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
27 changes: 14 additions & 13 deletions .github/workflows/macos-executable-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
35 changes: 20 additions & 15 deletions .releaserc.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,27 +15,32 @@
"@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"
}
]
}
],
[
"@semantic-release/release-notes-generator",
{
"preset": "conventionalcommits",
"presetConfig": {
"types": [{
"type": "feat",
"section": "Library - Features"
},
"types": [
{
"type": "feat",
"section": "Library - Features"
},
{
"type": "fix",
"section": "Library - Fixes"
Expand All @@ -62,7 +67,7 @@
"changelogFile": "CHANGES.md"
}
],
"@semantic-release/npm",
"@semantic-release/npm",
[
"@semantic-release/github",
{
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit a31bf6b

Please sign in to comment.