-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (50 loc) · 1.58 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
53
54
55
56
57
name: Release
on:
workflow_dispatch:
inputs:
bump-type:
type: choice
required: true
options:
- patch
- minor
- major
permissions:
contents: write
jobs:
bump:
runs-on: macos-11.0
steps:
# Checkout with custom token for pushin to protected branch
- uses: actions/checkout@v3
with:
token: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
# Update version in all files, commit, add tag and push
- run: |
git config user.name "GitHub Actions"
git config user.email "[email protected]"
ruby .github/scripts/bump.rb ${{ github.event.inputs.bump-type }}
# Build binary
- uses: maxim-lobanov/setup-xcode@v1
with: { xcode-version: '13.0' }
- name: Build Pods
run: |
swift build -c release --arch arm64 --arch x86_64
swift run pods --version
path=`swift build -c release --arch arm64 --arch x86_64 --show-bin-path`
mkdir -p pods/bin && mv $path/pods pods/bin
zip -r pods.zip pods
# Push tag and commit
- run: |
echo "release_tag=`git describe --tags --abbrev=0`" >> $GITHUB_ENV
git push origin
git push origin `git describe --tags --abbrev=0`
# Create release and discussion
- name: Release
uses: softprops/action-gh-release@v1
with:
name: 🌱 Pods ${{ env.release_tag }}
generate_release_notes: true
fail_on_unmatched_files: true
files: pods.zip
tag_name: ${{ env.release_tag }}