Skip to content

Commit

Permalink
refactor(_example): update Github Action
Browse files Browse the repository at this point in the history
  • Loading branch information
cage1016 committed Sep 8, 2023
1 parent 48cccb9 commit 3f862d5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Release
name: Gallery Release
on:
release:
types:
Expand Down Expand Up @@ -38,10 +38,10 @@ jobs:
# pack
cd .workflow
plutil -replace version -string "${{ env.tag }}" info.plist
zip -r ../"AkTest-${{ env.tag }}.alfredworkflow_" .
zip -r ../"AkTest_GALLERY-${{ env.tag }}.alfredworkflow" .
cd ..
echo "artifact=$(echo "AkTest-${{ env.tag }}.alfredworkflow_")" >> $GITHUB_ENV
echo "artifact=$(echo "AkTest_GALLERY-${{ env.tag }}.alfredworkflow")" >> $GITHUB_ENV
- name: Import Code-Signing Certificates
uses: Apple-Actions/import-codesign-certs@v1
with:
Expand Down Expand Up @@ -73,25 +73,25 @@ jobs:
# pack alfredworkflow
cd .workflow
plutil -replace version -string "${{ env.tag }}" info.plist
zip -r ../"AkTest-${{ env.tag }}.alfredworkflow_" .
zip -r ../"AkTest_GALLERY-${{ env.tag }}.alfredworkflow" .
cd ..
# zip alfredworkflow as zip archive for notarize
zip -r "AkTest-${{ env.tag }}.alfredworkflow.zip" "AkTest-${{ env.tag }}.alfredworkflow_"
zip -r "AkTest_GALLERY-${{ env.tag }}.alfredworkflow.zip" "AkTest_GALLERY-${{ env.tag }}.alfredworkflow"
# gon notarize
cat <<EOF >> notarize.json
{
"notarize": [{
"path": "${PWD}/AkTest-${{ env.tag }}.alfredworkflow.zip",
"path": "${PWD}/AkTest_GALLERY-${{ env.tag }}.alfredworkflow.zip",
"bundle_id": "com.xxx.aktest",
"staple": false
}]
}
EOF
gon -log-level=debug -log-json ./notarize.json
echo "artifact=$(echo "AkTest-${{ env.tag }}.alfredworkflow_")" >> $GITHUB_ENV
echo "artifact=$(echo "AkTest_GALLERY-${{ env.tag }}.alfredworkflow")" >> $GITHUB_ENV
- uses: shogo82148/actions-upload-release-asset@v1
with:
upload_url: ${{ github.event.release.upload_url }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Release_auto_update
name: Github Release
on:
release:
types:
Expand Down Expand Up @@ -38,10 +38,10 @@ jobs:
# pack
cd .workflow
plutil -replace version -string "${{ env.tag }}" info.plist
zip -r ../"AkTest_auto_update-${{ env.tag }}.alfredworkflow" .
zip -r ../"AkTest_GITHUB-${{ env.tag }}.alfredworkflow" .
cd ..
echo "artifact=$(echo "AkTest_auto_update-${{ env.tag }}.alfredworkflow")" >> $GITHUB_ENV
echo "artifact=$(echo "AkTest_GITHUB-${{ env.tag }}.alfredworkflow")" >> $GITHUB_ENV
- name: Import Code-Signing Certificates
uses: Apple-Actions/import-codesign-certs@v1
with:
Expand Down Expand Up @@ -73,25 +73,25 @@ jobs:
# pack alfredworkflow
cd .workflow
plutil -replace version -string "${{ env.tag }}" info.plist
zip -r ../"AkTest_auto_update-${{ env.tag }}.alfredworkflow" .
zip -r ../"AkTest_GITHUB-${{ env.tag }}.alfredworkflow" .
cd ..
# zip alfredworkflow as zip archive for notarize
zip -r "AkTest_auto_update-${{ env.tag }}.alfredworkflow.zip" "AkTest_auto_update-${{ env.tag }}.alfredworkflow"
zip -r "AkTest_GITHUB-${{ env.tag }}.alfredworkflow.zip" "AkTest_GITHUB-${{ env.tag }}.alfredworkflow"
# gon notarize
cat <<EOF >> notarize.json
{
"notarize": [{
"path": "${PWD}/AkTest_auto_update-${{ env.tag }}.alfredworkflow.zip",
"path": "${PWD}/AkTest_GITHUB-${{ env.tag }}.alfredworkflow.zip",
"bundle_id": "com.xxx.aktest",
"staple": false
}]
}
EOF
gon -log-level=debug -log-json ./notarize.json
echo "artifact=$(echo "AkTest_auto_update-${{ env.tag }}.alfredworkflow")" >> $GITHUB_ENV
echo "artifact=$(echo "AkTest_GITHUB-${{ env.tag }}.alfredworkflow")" >> $GITHUB_ENV
- uses: shogo82148/actions-upload-release-asset@v1
with:
upload_url: ${{ github.event.release.upload_url }}
Expand Down

0 comments on commit 3f862d5

Please sign in to comment.