Skip to content

Commit 21e2325

Browse files
committed
chore: Fix xcframework tarball creation.
Also, always run the "create tarball" action on pull requests as well, so we know whether it's going to work for master pushes.
1 parent b10c8b7 commit 21e2325

File tree

1 file changed

+13
-17
lines changed

1 file changed

+13
-17
lines changed

.github/workflows/deploy.yml

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ jobs:
7070
if: contains(github.ref, 'refs/tags/v')
7171
run: |
7272
tar zcf "${{ steps.get_version.outputs.release_tarball }}" toxcore-linux-${{ matrix.arch }}
73-
sha256sum "${{ steps.get_version.outputs.release_tarball }}" > "${{ steps.get_version.outputs.release_tarball }}.sha256"
73+
sha256sum "${{ steps.get_version.outputs.release_tarball }}" >"${{ steps.get_version.outputs.release_tarball }}.sha256"
7474
- name: Upload to versioned release
7575
if: contains(github.ref, 'refs/tags/v')
7676
uses: ncipollo/release-action@v1
@@ -80,10 +80,9 @@ jobs:
8080
token: ${{ secrets.GITHUB_TOKEN }}
8181
artifacts: "${{ steps.get_version.outputs.release_tarball }},${{ steps.get_version.outputs.release_tarball }}.sha256"
8282
- name: Create tarball for nightly upload
83-
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
8483
run: |
8584
tar zcf toxcore-nightly-linux-${{ matrix.arch }}.tar.gz toxcore-linux-${{ matrix.arch }}
86-
sha256sum toxcore-nightly-linux-${{ matrix.arch }}.tar.gz > toxcore-nightly-linux-${{ matrix.arch }}.tar.gz.sha256
85+
sha256sum toxcore-nightly-linux-${{ matrix.arch }}.tar.gz >toxcore-nightly-linux-${{ matrix.arch }}.tar.gz.sha256
8786
- name: Upload to nightly release
8887
uses: ncipollo/release-action@v1
8988
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
@@ -130,7 +129,7 @@ jobs:
130129
if: contains(github.ref, 'refs/tags/v')
131130
run: |
132131
tar zcf "${{ steps.get_version.outputs.release_tarball }}" toxcore-macos-${{ matrix.arch }}
133-
shasum -a 256 "${{ steps.get_version.outputs.release_tarball }}" > "${{ steps.get_version.outputs.release_tarball }}.sha256"
132+
shasum -a 256 "${{ steps.get_version.outputs.release_tarball }}" >"${{ steps.get_version.outputs.release_tarball }}.sha256"
134133
- name: Upload to versioned release
135134
if: contains(github.ref, 'refs/tags/v')
136135
uses: ncipollo/release-action@v1
@@ -140,10 +139,9 @@ jobs:
140139
token: ${{ secrets.GITHUB_TOKEN }}
141140
artifacts: "${{ steps.get_version.outputs.release_tarball }},${{ steps.get_version.outputs.release_tarball }}.sha256"
142141
- name: Create tarball for nightly upload
143-
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
144142
run: |
145143
tar zcf toxcore-nightly-macos-${{ matrix.arch }}.tar.gz toxcore-macos-${{ matrix.arch }}
146-
shasum -a 256 toxcore-nightly-macos-${{ matrix.arch }}.tar.gz > toxcore-nightly-macos-${{ matrix.arch }}.tar.gz.sha256
144+
shasum -a 256 toxcore-nightly-macos-${{ matrix.arch }}.tar.gz >toxcore-nightly-macos-${{ matrix.arch }}.tar.gz.sha256
147145
- name: Upload to nightly release
148146
uses: ncipollo/release-action@v1
149147
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
@@ -190,7 +188,7 @@ jobs:
190188
if: contains(github.ref, 'refs/tags/v')
191189
run: |
192190
tar zcf "${{ steps.get_version.outputs.release_tarball }}" toxcore-${{ matrix.target }}
193-
shasum -a 256 "${{ steps.get_version.outputs.release_tarball }}" > "${{ steps.get_version.outputs.release_tarball }}.sha256"
191+
shasum -a 256 "${{ steps.get_version.outputs.release_tarball }}" >"${{ steps.get_version.outputs.release_tarball }}.sha256"
194192
- name: Upload to versioned release
195193
if: contains(github.ref, 'refs/tags/v')
196194
uses: ncipollo/release-action@v1
@@ -200,10 +198,9 @@ jobs:
200198
token: ${{ secrets.GITHUB_TOKEN }}
201199
artifacts: "${{ steps.get_version.outputs.release_tarball }},${{ steps.get_version.outputs.release_tarball }}.sha256"
202200
- name: Create tarball for nightly upload
203-
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
204201
run: |
205202
tar zcf toxcore-nightly-${{ matrix.target }}.tar.gz toxcore-${{ matrix.target }}
206-
shasum -a 256 toxcore-nightly-${{ matrix.target }}.tar.gz > toxcore-nightly-${{ matrix.target }}.tar.gz.sha256
203+
shasum -a 256 toxcore-nightly-${{ matrix.target }}.tar.gz >toxcore-nightly-${{ matrix.target }}.tar.gz.sha256
207204
- name: Upload to nightly release
208205
uses: ncipollo/release-action@v1
209206
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
@@ -242,11 +239,12 @@ jobs:
242239
mv toxcore-* other/deploy/apple/
243240
other/deploy/apple/make-framework.sh
244241
tar -C other/deploy/apple -zcf toxcore-xcframework.tar.gz Tox.xcframework
242+
shasum -a 256 toxcore-xcframework.tar.gz >toxcore-xcframework.tar.gz.sha256
245243
- name: Upload artifacts
246244
uses: actions/upload-artifact@v4
247245
with:
248246
name: toxcore-xcframework
249-
path: toxcore-xcframework.tar.gz
247+
path: Tox.xcframework
250248
- name: Get tag name for release file name
251249
if: contains(github.ref, 'refs/tags/v')
252250
id: get_version
@@ -256,8 +254,8 @@ jobs:
256254
- name: Create tarball for release upload
257255
if: contains(github.ref, 'refs/tags/v')
258256
run: |
259-
cp toxcore-xcframework.tar.gz "${{ steps.get_version.outputs.release_tarball }}"
260-
shasum -a 256 "${{ steps.get_version.outputs.release_tarball }}" > "${{ steps.get_version.outputs.release_tarball }}.sha256"
257+
cp toxcore-xcframework.tar.gz "${{ steps.get_version.outputs.release_tarball }}"
258+
cp toxcore-xcframework.tar.gz.sha256 "${{ steps.get_version.outputs.release_tarball }}.sha256"
261259
- name: Upload to versioned release
262260
if: contains(github.ref, 'refs/tags/v')
263261
uses: ncipollo/release-action@v1
@@ -267,9 +265,8 @@ jobs:
267265
token: ${{ secrets.GITHUB_TOKEN }}
268266
artifacts: "${{ steps.get_version.outputs.release_tarball }},${{ steps.get_version.outputs.release_tarball }}.sha256"
269267
- name: Create tarball for nightly upload
270-
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
271268
run: |
272-
cp toxcore-xcframework.tar.gz toxcore-nightly-xcframework.tar.gz
269+
cp toxcore-xcframework.tar.gz toxcore-nightly-xcframework.tar.gz
273270
cp toxcore-xcframework.tar.gz.sha256 toxcore-nightly-xcframework.tar.gz.sha256
274271
- name: Upload to nightly release
275272
uses: ncipollo/release-action@v1
@@ -317,7 +314,7 @@ jobs:
317314
if: contains(github.ref, 'refs/tags/v')
318315
run: |
319316
tar zcf "${{ steps.get_version.outputs.release_tarball }}" toxcore-android-${{ matrix.arch }}
320-
sha256sum "${{ steps.get_version.outputs.release_tarball }}" > "${{ steps.get_version.outputs.release_tarball }}.sha256"
317+
sha256sum "${{ steps.get_version.outputs.release_tarball }}" >"${{ steps.get_version.outputs.release_tarball }}.sha256"
321318
- name: Upload to versioned release
322319
if: contains(github.ref, 'refs/tags/v')
323320
uses: ncipollo/release-action@v1
@@ -327,10 +324,9 @@ jobs:
327324
token: ${{ secrets.GITHUB_TOKEN }}
328325
artifacts: "${{ steps.get_version.outputs.release_tarball }},${{ steps.get_version.outputs.release_tarball }}.sha256"
329326
- name: Create tarball for nightly upload
330-
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
331327
run: |
332328
tar zcf toxcore-nightly-android-${{ matrix.arch }}.tar.gz toxcore-android-${{ matrix.arch }}
333-
sha256sum toxcore-nightly-android-${{ matrix.arch }}.tar.gz > toxcore-nightly-android-${{ matrix.arch }}.tar.gz.sha256
329+
sha256sum toxcore-nightly-android-${{ matrix.arch }}.tar.gz >toxcore-nightly-android-${{ matrix.arch }}.tar.gz.sha256
334330
- name: Upload to nightly release
335331
uses: ncipollo/release-action@v1
336332
if: github.event_name == 'push' && github.ref == 'refs/heads/master'

0 commit comments

Comments
 (0)