Skip to main content

.github/workflows/upload_binaries.yml

1name: Upload binaries
3on:
4 push:
5 tags:
6 - v[0-9]+.*
8jobs:
9 create-release:
10 runs-on: ubuntu-latest
11 permissions:
12 contents: write
13 steps:
14 - uses: actions/checkout@v4
15 - uses: taiki-e/create-gh-release-action@v1
16 with:
17 changelog: CHANGELOG.md
18 env:
19 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
21 upload-assets:
22 strategy:
23 matrix:
25 # See https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories
26 include:
27 - target: aarch64-apple-darwin
28 os: macos-latest
29 - target: x86_64-apple-darwin
30 os: macos-13
32 runs-on: ${{ matrix.os }}
34 permissions:
35 contents: write
37 steps:
38 - uses: actions/checkout@v4
40 - name: Compile the Swift script
41 run: swiftc save_safari_webarchive.swift
43 - name: Create the zip archive
44 run: zip "save_safari_webarchive.${{ matrix.target }}.zip" save_safari_webarchive README.md LICENSE
46 - name: Push the zip file to the GitHub release
47 run: gh release upload "$GITHUB_REF_NAME" "save_safari_webarchive.${{ matrix.target }}.zip" --clobber
48 env:
49 GH_TOKEN: ${{ github.token }}