Skip to content

3.0.10

3.0.10 #14

Workflow file for this run

name: Release Build
on:
release:
types: [published]
jobs:
release-build:
name: Release Build
runs-on: macos-13
outputs:
sha: ${{ steps.sha256.outputs.sha256 }}
env:
TAG: ${{ github.ref_name }}
GH_TOKEN: ${{ github.token }}
steps:
- uses: actions/checkout@v4
- name: Build executable
run: |
swift build \
--configuration release \
--product swift-package-list \
--arch arm64 \
--arch x86_64
- name: Archive executable
run: |
tar -c -v -z \
-f swift-package-list.tar.gz \
-C .build/apple/Products/Release \
swift-package-list
- name: Upload archived executable to release
run: |
gh release upload ${{ env.TAG }} swift-package-list.tar.gz
- name: Create SHA256
id: sha256
run: |
SHA256=($(shasum -a 256 swift-package-list.tar.gz))
echo "sha256=$SHA256" >> "$GITHUB_OUTPUT"
update-formula:
name: Update Formula
runs-on: ubuntu-latest
needs: release-build
env:
TAG: ${{ github.ref_name }}
SHA256: ${{ needs.release-build.outputs.sha }}
steps:
- name: Checkout FelixHerrmann/homebrew-tap
uses: actions/checkout@v4
with:
repository: 'FelixHerrmann/homebrew-tap'
- name: Update Formula
run: |
sed -i "s|download\/.*\/swift-package-list|download\/$TAG\/swift-package-list|g" Formula/swift-package-list.rb
sed -i "s|sha256 \".*\"|sha256 \"$SHA256\"|g" Formula/swift-package-list.rb
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.HOMEBREW_TAP_TOKEN }}
branch: swift-package-list/${{ env.TAG }}
title: Release swift-package-list ${{ env.TAG }}
body: This automated PR will update swift-package-list to version ${{ env.TAG }}.
commit-message: Bump swift-package-list to ${{ env.TAG }}
labels: release, automated pr
delete-branch: true