Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a GitHub Action to upload binaries #7

Closed
wants to merge 9 commits into from
58 changes: 50 additions & 8 deletions .github/workflows/upload_binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,60 @@ name: Upload binaries

on:
push:
tags:
- v[0-9]+.*
branches:
- main

pull_request:
branches:
- main

# push:
# tags:
# - v[0-9]+.*

jobs:
create-release:
runs-on: ubuntu-latest
# create-release:
# runs-on: ubuntu-latest
# permissions:
# contents: write
# steps:
# - uses: actions/checkout@v4
# - uses: taiki-e/create-gh-release-action@v1
# with:
# changelog: CHANGELOG.md
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

upload-assets:
strategy:
matrix:
include:
- target: aarch64-apple-darwin
os: macos-latest
# - target: x86_64-apple-darwin
# os: macos-latest
runs-on: ${{ matrix.os }}

permissions:
contents: write

steps:
- uses: actions/checkout@v4
- uses: taiki-e/create-gh-release-action@v1
with:
changelog: CHANGELOG.md

# - name: Compile the Swift script
# run: |
# swiftc save_safari_webarchive.swift
# zip save_safari_webarchive.${{ matrix.target }}.zip save_safari_webarchive

- name: Get GitHub releases
run: |
gh release list --limit=1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN: ${{ github.token }}
# with:
# target: ${{ matrix.target }}
# bin: dominant_colours
# tar: all
# zip: windows
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}