-
Notifications
You must be signed in to change notification settings - Fork 167
51 lines (45 loc) · 2.02 KB
/
prepare.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
name: Prepare release
on:
pull_request:
types: [ labeled ]
branches:
- master
jobs:
prepare-release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Fetch the lastest release version
id: fetch_latest_release
uses: pozetroninc/github-action-get-latest-release@master
with:
repository: ${{ github.repository }}
excludes: prerelease, draft
- uses: actions/checkout@v2
with:
repository: pusher/actions
token: ${{ secrets.PUSHER_CI_GITHUB_PRIVATE_TOKEN }}
path: .github/actions
- uses: ./.github/actions/prepare-version-bump
id: bump
with:
current_version: ${{ steps.fetch_latest_release.outputs.release }}
- uses: actions/setup-node@v3
with:
node-version: 16.x
- name: "Bump podspec versions"
shell: bash
run: |
npm install --location=global podspec-bump
sed -i 's/${{ steps.bump.outputs.current_version }}/${{ steps.bump.outputs.new_version }}/1' Tests/Integration/PusherClientInitializationTests.swift
sed -i 's/${{ steps.bump.outputs.current_version }}/${{ steps.bump.outputs.new_version }}/1' Tests/Info.plist
sed -i 's/${{ steps.bump.outputs.current_version }}/${{ steps.bump.outputs.new_version }}/1' Sources/PusherSwift.swift
sed -i 's/${{ steps.bump.outputs.current_version }}/${{ steps.bump.outputs.new_version }}/1' Sources/Info.plist
podspec-bump -i ${{ steps.bump.outputs.new_version }} -w -p PusherSwift.podspec
podspec-bump -i ${{ steps.bump.outputs.new_version }} -w -p PusherSwiftWithEncryption.podspec
git add Tests/Integration/PusherClientInitializationTests.swift Tests/Info.plist Sources/PusherSwift.swift Sources/Info.plist PusherSwift.podspec PusherSwiftWithEncryption.podspec
git commit -m "Bump to version ${{ steps.bump.outputs.new_version }}"
git push