-
Notifications
You must be signed in to change notification settings - Fork 21
52 lines (52 loc) · 1.89 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: release
on:
push:
tags:
- "*"
workflow_dispatch: {} # support manual runs
permissions:
contents: write
jobs:
release:
runs-on: macos-14
steps:
- uses: actions/checkout@v4
- name: Select Xcode version
# https://github.com/actions/runner-images/blob/main/images/macos/macos-14-arm64-Readme.md#xcode
run: sudo xcode-select --switch /Applications/Xcode_16.app
- uses: bufbuild/buf-setup-action@v1.48.0
with:
github_token: ${{ github.token }}
- name: Build plugins
run: make buildplugins
- name: Zip artifacts
run: |
cd ./.tmp/bin
mkdir ./artifacts
tar -zcvf ./artifacts/protoc-gen-connect-swift.tar.gz ./protoc-gen-connect-swift
tar -zcvf ./artifacts/protoc-gen-connect-swift-mocks.tar.gz ./protoc-gen-connect-swift-mocks
cd ./artifacts
for file in $(find . -maxdepth 1 -type f | sed 's/^\.\///' | sort | uniq); do
shasum -a 256 "${file}" >> sha256.txt
done
- name: Publish release
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
append_body: true
files: |
./.tmp/bin/artifacts/*
publish-podspecs:
runs-on: macos-14
steps:
- uses: actions/checkout@v4
- name: Select Xcode version
# https://github.com/actions/runner-images/blob/main/images/macos/macos-14-arm64-Readme.md#xcode
run: sudo xcode-select --switch /Applications/Xcode_16.app
- name: Publish podspecs to CocoaPods
env:
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
# Note that --synchronous is used since Mocks depends on the primary spec.
run: |
pod trunk push Connect-Swift.podspec --allow-warnings --synchronous
pod trunk push Connect-Swift-Mocks.podspec --allow-warnings --synchronous