@@ -88,66 +88,65 @@ jobs:
88
88
./build/finschia-${{ env.ID }}.md5
89
89
./build/finschia-${{ env.ID }}.sha256
90
90
91
- # build_for_darwin:
92
- # name: "Release Build for macOS"
93
- # needs: create_tarball
94
- # runs-on: macOS-latest
95
- # strategy:
96
- # matrix:
97
- # arch: [ "amd64", "arm64" ]
98
- # include:
99
- # - arch: amd64
100
- # libwasmvm: libwasmvm.dylib
101
- # - arch: arm64
102
- # libwasmvm: libwasmvm.dylib
103
- # steps:
104
- # - name: "Set tag as version"
105
- # run: echo "VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV # set env.VERSION=v0.0.0
106
- # - name: "Setup Xcode"
107
- # run: sudo xcode-select --switch /Applications/Xcode.app
108
- # - name: "Install md5sum"
109
- # run: |
110
- # brew update
111
- # brew install md5sha1sum
112
- # - name: "Install go"
113
- # uses: actions/setup-go@v3
114
- # with:
115
- # go-version: '1.18'
116
- # check-latest: true
117
- # - name: "Print go environment"
118
- # run: go env
119
- # - name: "Download compressed repository source"
120
- # uses: actions/download-artifact@v3
121
- # with:
122
- # name: release-${{ env.VERSION }}
123
- # - name: "Extract compressed repository source"
124
- # run: tar zxf finschia-${{ env.VERSION }}.tgz --strip-components=1
125
- #
126
- # - name: "Set ID=${{ env.VERSION }}-darwin-${{ matrix.arch }}"
127
- # run: echo "ID=${{ env.VERSION }}-darwin-${{ matrix.arch }}" >> $GITHUB_ENV
128
- # - name: "Build release bundle: darwin-${{ matrix.arch }}"
129
- # run: |
130
- # go env -w GOARCH=${{ matrix.arch }}
131
- # make clean build-release-bundle
132
- # - name: "Create checksum: darwin-${{ matrix.arch }}"
133
- # run: |
134
- # cd ./build
135
- # ls -laF
136
- # md5sum finschia-${{ env.ID }}.tgz > ./finschia-${{ env.ID }}.md5
137
- # shasum -a 256 finschia-${{ env.ID }}.tgz > ./finschia-${{ env.ID }}.sha256
138
- # - name: "Store artifact: darwin-${{ matrix.arch }}"
139
- # uses: actions/upload-artifact@v3
140
- # with:
141
- # name: release-${{ env.VERSION }}
142
- # path: |
143
- # ./build/finschia-${{ env.ID }}.tgz
144
- # ./build/finschia-${{ env.ID }}.md5
145
- # ./build/finschia-${{ env.ID }}.sha256
91
+ build_for_darwin :
92
+ name : " Release Build for macOS"
93
+ needs : create_tarball
94
+ runs-on : macOS-latest
95
+ strategy :
96
+ matrix :
97
+ arch : [ "amd64", "arm64" ]
98
+ include :
99
+ - arch : amd64
100
+ libwasmvm : libwasmvm.dylib
101
+ - arch : arm64
102
+ libwasmvm : libwasmvm.dylib
103
+ steps :
104
+ - name : " Set tag as version"
105
+ run : echo "VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV # set env.VERSION=v0.0.0
106
+ - name : " Setup Xcode"
107
+ run : sudo xcode-select --switch /Applications/Xcode.app
108
+ - name : " Install md5sum"
109
+ run : |
110
+ brew update
111
+ brew install md5sha1sum
112
+ - name : " Install go"
113
+ uses : actions/setup-go@v3
114
+ with :
115
+ go-version : ' 1.18'
116
+ check-latest : true
117
+ - name : " Print go environment"
118
+ run : go env
119
+ - name : " Download compressed repository source"
120
+ uses : actions/download-artifact@v3
121
+ with :
122
+ name : release-${{ env.VERSION }}
123
+ - name : " Extract compressed repository source"
124
+ run : tar zxf finschia-${{ env.VERSION }}.tgz --strip-components=1
125
+
126
+ - name : " Set ID=${{ env.VERSION }}-darwin-${{ matrix.arch }}"
127
+ run : echo "ID=${{ env.VERSION }}-darwin-${{ matrix.arch }}" >> $GITHUB_ENV
128
+ - name : " Build release bundle: darwin-${{ matrix.arch }}"
129
+ run : |
130
+ go env -w GOARCH=${{ matrix.arch }}
131
+ make clean build-release-bundle
132
+ - name : " Create checksum: darwin-${{ matrix.arch }}"
133
+ run : |
134
+ cd ./build
135
+ ls -laF
136
+ md5sum finschia-${{ env.ID }}.tgz > ./finschia-${{ env.ID }}.md5
137
+ shasum -a 256 finschia-${{ env.ID }}.tgz > ./finschia-${{ env.ID }}.sha256
138
+ - name : " Store artifact: darwin-${{ matrix.arch }}"
139
+ uses : actions/upload-artifact@v3
140
+ with :
141
+ name : release-${{ env.VERSION }}
142
+ path : |
143
+ ./build/finschia-${{ env.ID }}.tgz
144
+ ./build/finschia-${{ env.ID }}.md5
145
+ ./build/finschia-${{ env.ID }}.sha256
146
146
147
147
create_release :
148
148
name : " Create Release"
149
- needs : [ build_for_linux ]
150
- # needs: [ build_for_linux, build_for_darwin ]
149
+ needs : [ build_for_linux, build_for_darwin ]
151
150
runs-on : ubuntu-latest
152
151
steps :
153
152
- name : " Set tag as version"
@@ -211,24 +210,24 @@ jobs:
211
210
asset_path : finschia-${{ env.VERSION }}-linux-arm64.tgz
212
211
asset_name : finschia-${{ env.VERSION }}-linux-arm64.tgz
213
212
asset_content_type : application/octet-stream
214
- # - name: "Upload artifact: finschia-${{ env.VERSION }}-dawrin-amd64"
215
- # uses: actions/upload-release-asset@v1
216
- # env:
217
- # GITHUB_TOKEN: ${{ github.token }}
218
- # with:
219
- # upload_url: ${{ steps.create_release.outputs.upload_url }}
220
- # asset_path: finschia-${{ env.VERSION }}-darwin-amd64.tgz
221
- # asset_name: finschia-${{ env.VERSION }}-darwin-amd64.tgz
222
- # asset_content_type: application/octet-stream
223
- # - name: "Upload artifact: finschia-${{ env.VERSION }}-dawrin-arm64"
224
- # uses: actions/upload-release-asset@v1
225
- # env:
226
- # GITHUB_TOKEN: ${{ github.token }}
227
- # with:
228
- # upload_url: ${{ steps.create_release.outputs.upload_url }}
229
- # asset_path: finschia-${{ env.VERSION }}-darwin-arm64.tgz
230
- # asset_name: finschia-${{ env.VERSION }}-darwin-arm64.tgz
231
- # asset_content_type: application/octet-stream
213
+ - name : " Upload artifact: finschia-${{ env.VERSION }}-dawrin-amd64"
214
+ uses : actions/upload-release-asset@v1
215
+ env :
216
+ GITHUB_TOKEN : ${{ github.token }}
217
+ with :
218
+ upload_url : ${{ steps.create_release.outputs.upload_url }}
219
+ asset_path : finschia-${{ env.VERSION }}-darwin-amd64.tgz
220
+ asset_name : finschia-${{ env.VERSION }}-darwin-amd64.tgz
221
+ asset_content_type : application/octet-stream
222
+ - name : " Upload artifact: finschia-${{ env.VERSION }}-dawrin-arm64"
223
+ uses : actions/upload-release-asset@v1
224
+ env :
225
+ GITHUB_TOKEN : ${{ github.token }}
226
+ with :
227
+ upload_url : ${{ steps.create_release.outputs.upload_url }}
228
+ asset_path : finschia-${{ env.VERSION }}-darwin-arm64.tgz
229
+ asset_name : finschia-${{ env.VERSION }}-darwin-arm64.tgz
230
+ asset_content_type : application/octet-stream
232
231
- name : " Upload artifact: compressed repository source"
233
232
uses : actions/upload-release-asset@v1
234
233
env :
0 commit comments