Skip to content

Commit d8ef96f

Browse files
authored
Merge pull request #838 from roman-aliyev/main
Steps to create and release artifactbundle.
2 parents cc867f6 + 9c3ab0f commit d8ef96f

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

.github/workflows/release.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,56 @@ jobs:
7878
asset_path: ${{ runner.temp }}/rswift-${{ github.event.release.tag_name }}.zip
7979
asset_name: rswift-${{ github.event.release.tag_name }}.zip
8080
asset_content_type: application/zip
81+
82+
- name: Make artifact bundle
83+
run: |
84+
set -ex
85+
86+
mkdir -p $ARTIFACT_BUNDLE_DIR/rswift/bin
87+
cp .build/apple/Products/Release/rswift $ARTIFACT_BUNDLE_DIR/rswift/bin
88+
cp License $ARTIFACT_BUNDLE_DIR/rswift
89+
90+
cat <<EOF > $ARTIFACT_BUNDLE_DIR/info.json
91+
{
92+
"schemaVersion": "1.0",
93+
"artifacts": {
94+
"rswift": {
95+
"type": "executable",
96+
"version": "$VERSION",
97+
"variants": [
98+
{
99+
"path": "rswift/bin/rswift",
100+
"supportedTriples": ["x86_64-apple-macosx", "arm64-apple-macosx"]
101+
},
102+
]
103+
}
104+
}
105+
}
106+
EOF
107+
108+
zip -r $FILENAME $ARTIFACT_BUNDLE_DIR
109+
env:
110+
VERSION: ${{ github.event.release.tag_name }}
111+
ARTIFACT_BUNDLE_DIR: ${{ runner.temp }}/rswift.artifactbundle
112+
FILENAME: ${{ runner.temp }}/rswift-${{ github.event.release.tag_name }}.artifactbundle.zip
113+
- name: Notarize artifact bundle
114+
run: |
115+
xcrun notarytool submit $FILENAME --apple-id $APPLE_ID --password $APP_PASSWORD --team-id $TEAM_ID --wait
116+
env:
117+
BUNDLE_ID: com.nonstrict.rswift
118+
APPLE_ID: ${{ secrets.APPLE_IDENTIFIER }}
119+
APP_PASSWORD: ${{ secrets.APPLE_IDENTIFIER_PASSWORD }}
120+
TEAM_ID: WT5N9FK54M
121+
FILENAME: ${{ runner.temp }}/rswift-${{ github.event.release.tag_name }}.artifactbundle.zip
122+
- name: Attach artifact bundle to release
123+
uses: actions/upload-release-asset@v1
124+
env:
125+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
126+
with:
127+
upload_url: ${{ github.event.release.upload_url }}
128+
asset_path: ${{ runner.temp }}/rswift-${{ github.event.release.tag_name }}.artifactbundle.zip
129+
asset_name: rswift-${{ github.event.release.tag_name }}.artifactbundle.zip
130+
asset_content_type: application/zip
81131

82132
- name: Archive PKG
83133
run: |

0 commit comments

Comments
 (0)