Skip to content

Commit

Permalink
ci: add auto release (#1632)
Browse files Browse the repository at this point in the history
  • Loading branch information
mtrezza authored Nov 21, 2021
1 parent e09104e commit 922e5bf
Show file tree
Hide file tree
Showing 11 changed files with 4,952 additions and 45 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
branches: [ '**' ]
env:
CI_XCODE_11: '/Applications/Xcode_11.7.app/Contents/Developer'
CI_XCODE_13: '/Applications/Xcode_13.1.app/Contents/Developer'
Expand Down Expand Up @@ -34,7 +34,6 @@ jobs:
- name: Send codecov
run: bash <(curl https://codecov.io/bash)


macos:
runs-on: macos-latest
steps:
Expand Down Expand Up @@ -152,7 +151,7 @@ jobs:
env:
DEVELOPER_DIR: ${{ env.CI_XCODE_13 }}

release:
assets:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
Expand Down
Original file line number Diff line number Diff line change
@@ -1,28 +1,23 @@
name: release
name: release-automated
on:
release:
types: [published]
push:
branches: [ master, release, alpha, beta ]
env:
CI_XCODE_11: '/Applications/Xcode_11.7.app/Contents/Developer'
CI_XCODE_13: '/Applications/Xcode_13.0.app/Contents/Developer'

jobs:
cocoapods:
runs-on: macos-11
steps:
- uses: actions/checkout@v2
- name: CocoaPods
run: set -o pipefail && env NSUnbufferedIO=YES pod lib lint --allow-warnings --verbose
- name: Deploy CocoaPods
run: set -o pipefail && env NSUnbufferedIO=YES pod trunk push Parse.podspec --allow-warnings --verbose
env:
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
DEVELOPER_DIR: ${{ env.CI_XCODE_13 }}

docs:
runs-on: macos-11
release:
runs-on: ubuntu-latest
outputs:
current_tag: ${{ steps.tag.outputs.current_tag }}
steps:
- uses: actions/checkout@v2
with:
persist-credentials: false
- uses: actions/setup-node@v2
with:
node-version: 14
- name: Cache Gems
id: cache-gems
uses: actions/cache@v2
Expand All @@ -31,25 +26,47 @@ jobs:
key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gem-
- name: Install Bundle
- name: Submodules and Bundle Install
run: |
bundle config path vendor/bundle
git submodule update --init --recursive
sudo gem install bundler
bundle config set path 'vendor/bundle'
bundle install
- name: Create Jazzy Docs
run: |
./Scripts/jazzy.sh
- run: npm ci
- run: npx semantic-release
env:
DEVELOPER_DIR: ${{ env.CI_XCODE_13 }}
- name: Deploy Jazzy Docs
uses: peaceiris/actions-gh-pages@v3
GH_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Determine tag on current commit
id: tag
run: echo "::set-output name=current_tag::$(git describe --tags --abbrev=0 --exact-match || echo '')"

cocoapods:
needs: release
if: needs.release.outputs.current_tag != ''
runs-on: macos-11
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs
ref: ${{ needs.release.outputs.current_tag }}
- name: CocoaPods
run: set -o pipefail && env NSUnbufferedIO=YES pod lib lint --allow-warnings --verbose
- name: Deploy CocoaPods
run: set -o pipefail && env NSUnbufferedIO=YES pod trunk push Parse.podspec --allow-warnings --verbose
env:
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
DEVELOPER_DIR: ${{ env.CI_XCODE_13 }}

release:
assets:
needs: release
if: needs.release.outputs.current_tag != ''
runs-on: macos-11
steps:
- uses: actions/checkout@v2
- name: Checkout repository
uses: actions/checkout@v2
with:
ref: ${{ needs.release.outputs.current_tag }}
- name: Cache Gems
id: cache-gems
uses: actions/cache@v2
Expand All @@ -73,6 +90,38 @@ jobs:
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: build/release/*
tag: ${{ github.ref }}
tag: ${{ needs.release.outputs.current_tag }}
overwrite: true
file_glob: true

publish-docs:
needs: release
if: needs.release.outputs.current_tag != ''
runs-on: macos-11
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
ref: ${{ needs.release.outputs.current_tag }}
- name: Cache Gems
id: cache-gems
uses: actions/cache@v2
with:
path: vendor/bundle
key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gem-
- name: Install Bundle
run: |
bundle config path vendor/bundle
bundle install
- name: Create Jazzy Docs
run: |
./Scripts/jazzy.sh
env:
DEVELOPER_DIR: ${{ env.CI_XCODE_13 }}
- name: Deploy Jazzy Docs
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,14 @@ docs/
.idea/
ParseFacebookUtils/Vendor
ParseUI/Vendor

# VSC
.project

# Node
node_modules/
npm-debug.log

# Ruby
.bundle
Vendor/
61 changes: 61 additions & 0 deletions .releaserc/commit.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
*{{#if scope}} **{{scope}}:**
{{~/if}} {{#if subject}}
{{~subject}}
{{~else}}
{{~header}}
{{~/if}}

{{~!-- commit link --}} {{#if @root.linkReferences~}}
([{{shortHash}}](
{{~#if @root.repository}}
{{~#if @root.host}}
{{~@root.host}}/
{{~/if}}
{{~#if @root.owner}}
{{~@root.owner}}/
{{~/if}}
{{~@root.repository}}
{{~else}}
{{~@root.repoUrl}}
{{~/if}}/
{{~@root.commit}}/{{hash}}))
{{~else}}
{{~shortHash}}
{{~/if}}

{{~!-- commit references --}}
{{~#if references~}}
, closes
{{~#each references}} {{#if @root.linkReferences~}}
[
{{~#if this.owner}}
{{~this.owner}}/
{{~/if}}
{{~this.repository}}#{{this.issue}}](
{{~#if @root.repository}}
{{~#if @root.host}}
{{~@root.host}}/
{{~/if}}
{{~#if this.repository}}
{{~#if this.owner}}
{{~this.owner}}/
{{~/if}}
{{~this.repository}}
{{~else}}
{{~#if @root.owner}}
{{~@root.owner}}/
{{~/if}}
{{~@root.repository}}
{{~/if}}
{{~else}}
{{~@root.repoUrl}}
{{~/if}}/
{{~@root.issue}}/{{this.issue}})
{{~else}}
{{~#if this.owner}}
{{~this.owner}}/
{{~/if}}
{{~this.repository}}#{{this.issue}}
{{~/if}}{{/each}}
{{~/if}}

11 changes: 11 additions & 0 deletions .releaserc/footer.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{{#if noteGroups}}
{{#each noteGroups}}

### {{title}}

{{#each notes}}
* {{#if commit.scope}}**{{commit.scope}}:** {{/if}}{{text}} ([{{commit.shortHash}}]({{commit.shortHash}}))
{{/each}}
{{/each}}

{{/if}}
25 changes: 25 additions & 0 deletions .releaserc/header.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{{#if isPatch~}}
##
{{~else~}}
#
{{~/if}} {{#if @root.linkCompare~}}
[{{version}}](
{{~#if @root.repository~}}
{{~#if @root.host}}
{{~@root.host}}/
{{~/if}}
{{~#if @root.owner}}
{{~@root.owner}}/
{{~/if}}
{{~@root.repository}}
{{~else}}
{{~@root.repoUrl}}
{{~/if~}}
/compare/{{previousTag}}...{{currentTag}})
{{~else}}
{{~version}}
{{~/if}}
{{~#if title}} "{{title}}"
{{~/if}}
{{~#if date}} ({{date}})
{{/if}}
14 changes: 14 additions & 0 deletions .releaserc/template.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{{> header}}

{{#each commitGroups}}

{{#if title}}
### {{title}}

{{/if}}
{{#each commits}}
{{> commit root=@root}}
{{/each}}
{{/each}}

{{> footer}}
17 changes: 5 additions & 12 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
# Parse-SDK-iOS-OSX Changelog

### master
[Full Changelog](https://github.com/parse-community/Parse-SDK-iOS-OSX/compare/1.19.2...master)
* _Contributing to this repo? Add info about your change here to be included in next release_

### 1.19.2
# 1.19.2
[Full Changelog](https://github.com/parse-community/Parse-SDK-iOS-OSX/compare/1.19.1...1.19.2)

__Improvements__
Expand All @@ -13,7 +7,7 @@ __Improvements__
__Fixes__
- Crash in Twitter login flow ([#1566](https://github.com/parse-community/Parse-SDK-iOS-OSX/pull/1567)), thanks to [dhana](https://github.com/dsp1589).

### 1.19.1
# 1.19.1
[Full Changelog](https://github.com/parse-community/Parse-SDK-iOS-OSX/compare/1.19.0...1.19.1)

__Improvements__
Expand All @@ -24,7 +18,7 @@ __Fixes__
- Bolts compilation error in Xcode 12 ([#1548](https://github.com/parse-community/Parse-SDK-iOS-OSX/pull/1548)), thanks to [Derek Lee](https://github.com/derekleerock).
- App Store submission failed for MinimumOSVersion ([#1515](https://github.com/parse-community/Parse-SDK-iOS-OSX/issues/1515)), thanks to [Manuel Trezza](https://github.com/mtrezza).

### 1.19.0
# 1.19.0
[Full Changelog](https://github.com/parse-community/Parse-SDK-iOS-OSX/compare/1.18.0...1.19.0)

__New features__
Expand All @@ -38,8 +32,7 @@ __Fixes__
- Removes deprecated UIWebView usage ([#1511](https://github.com/parse-community/Parse-SDK-iOS-OSX/pull/1511)), thanks to [Nathan Kellert](https://github.com/parse-community/Parse-SDK-iOS-OSX/commits?author=noobs2ninjas).
- Fixes building with Xcode 12 ([#1527](https://github.com/parse-community/Parse-SDK-iOS-OSX/pull/1527)), thanks to [Steffen Matthischke](https://github.com/HeEAaD).


### 1.18.0
# 1.18.0
[Full Changelog](https://github.com/parse-community/Parse-SDK-iOS-OSX/compare/1.17.3...1.18.0)

__New features__
Expand All @@ -66,7 +59,7 @@ __Fixes__
After getting in contact with the Bolts Framework maintainers from Facebook they have allowed us to get changes in to fix app store declines due to still using UIWebView(iOS only) rather than updating to WKWebView(iOS, macOS, and iPad OS compatible). Those that got declined should be able to re-submit after updating to the latest version of this SDK as well as its dependencies.


### 1.17.3
# 1.17.3
[Full Changelog](https://github.com/parse-community/Parse-SDK-iOS-OSX/compare/1.17.2...1.17.3)

__New Features__
Expand Down
Loading

0 comments on commit 922e5bf

Please sign in to comment.