-
Notifications
You must be signed in to change notification settings - Fork 114
45 lines (37 loc) · 1.51 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
name: Release
on:
release:
types:
- published
jobs:
release:
name: Publish GitHub and Cocoapods release
runs-on: macos-12
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Select Xcode version
run: sudo xcode-select --switch /Applications/Xcode_14.1.app
- name: Build
run: |
swift build -c release --arch arm64 --arch x86_64
cp ./.build/apple/Products/Release/figma-export ./Release/figma-export
cp -r ./.build/apple/Products/Release/figma-export_AndroidExport.bundle ./Release/figma-export_AndroidExport.bundle
cp -r ./.build/apple/Products/Release/figma-export_XcodeExport.bundle ./Release/figma-export_XcodeExport.bundle
zip -r figma-export.zip Release LICENSE
- name: "Upload assets to a release"
run: gh release upload ${{ github.event.release.tag_name }} figma-export.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Install Cocoapods
run: gem install cocoapods
- name: Deploy to Cocoapods
run: |
set -eo pipefail
pod trunk push FigmaExport.podspec
env:
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
- name: Update Homebrew formulae
run: gh workflow run bump-formula.yml --repo RedMadRobot/homebrew-formulae --field formula=figma-export --field version=${{ github.event.release.tag_name }}
env:
GITHUB_TOKEN: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}