|
78 | 78 | asset_path: ${{ runner.temp }}/rswift-${{ github.event.release.tag_name }}.zip
|
79 | 79 | asset_name: rswift-${{ github.event.release.tag_name }}.zip
|
80 | 80 | 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 |
81 | 131 |
|
82 | 132 | - name: Archive PKG
|
83 | 133 | run: |
|
|
0 commit comments