Skip to content

Commit

Permalink
Infra GitHub actions (#1)
Browse files Browse the repository at this point in the history
* Create UpdateChangelog.yml

* Update and rename ci.yml to CIBuild.yml

* Update CIBuild.yml

---------

Co-authored-by: Wei18 <Wei18@users.noreply.github.com>
  • Loading branch information
Wei18 and Wei18 committed Mar 16, 2024
1 parent 77736e0 commit df50aba
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 15 deletions.
21 changes: 10 additions & 11 deletions .github/workflows/ci.yml → .github/workflows/CIBuild.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
name: CI
name: CI Build

on:
push:
branches:
- develop
paths:
- 'ActionSheetPicker-3.0.podspec'
- 'Package.swift'
- 'CoreActionSheetPicker/**'

jobs:

build:
strategy:
fail-fast: false
matrix:
xcode:
# - "12.5.1"
- "13.2.1"
os:
- macos-11
# - macos-latest

include:
- xcode: "13.2.1"
os: macos-11
# - xcode: "15.2"
# os: macOS-14
runs-on: ${{ matrix.os }}
env:
DEVELOPER_DIR: "/Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer"
steps:
- uses: actions/checkout@v4

- name: "Build SwiftPackage"
run: |
# Starting with Xcode 11, xcodebuild supports SwiftPM packages out of the box.
Expand All @@ -32,7 +32,6 @@ jobs:
-scheme CoreActionSheetPicker \
-sdk iphonesimulator \
-destination "name=iPhone 11 Pro"
- name: "Build CocoaPods"
run: |
gem install cocoapods
Expand Down
40 changes: 40 additions & 0 deletions .github/workflows/UpdateChangelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Update Changelog

on:
schedule:
# Will run at 01:00 on the 1st and 15th of every month
- cron: "30 1 1,15 * *"

concurrency:
group: update-changelog
cancel-in-progress: true

jobs:
update:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.1'
- uses: actions/cache@v4
with:
path: ${{ env.GEM_HOME }}
key: ${{ runner.os }}
- name: "Update CHANGELOG.md"
env:
CHANGELOG_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gem install github_changelog_generator
- name: "Commit CHANGELOG.md"
run: |
github_changelog_generator -u skywinder -p ActionSheetPicker-3.0
git add CHANGELOG.md
if [ ! -n "$(git status -s)" ]; then
echo "NOTHING TO COMMIT"
else
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
git commit -m "Update CHANGELOG.md"
git push --no-verify
fi
13 changes: 9 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## [Unreleased](https://github.com/skywinder/ActionSheetPicker-3.0/tree/HEAD)

[Full Changelog](https://github.com/skywinder/ActionSheetPicker-3.0/compare/2.7.3...HEAD)

**Merged pull requests:**

- add Wei18 as a contributor for infra, review, and maintenance [\#572](https://github.com/skywinder/ActionSheetPicker-3.0/pull/572) ([allcontributors[bot]](https://github.com/apps/allcontributors))
- Update CONTRIBUTING.md [\#553](https://github.com/skywinder/ActionSheetPicker-3.0/pull/553) ([noorulain17](https://github.com/noorulain17))

## [2.7.3](https://github.com/skywinder/ActionSheetPicker-3.0/tree/2.7.3) (2024-02-05)

[Full Changelog](https://github.com/skywinder/ActionSheetPicker-3.0/compare/2.7.2...2.7.3)
Expand Down Expand Up @@ -908,10 +917,6 @@

[Full Changelog](https://github.com/skywinder/ActionSheetPicker-3.0/compare/1.0.13...1.0.14)

**Merged pull requests:**

- Set minimum date properly. [\#14](https://github.com/skywinder/ActionSheetPicker-3.0/pull/14) ([matt](https://github.com/matt))

## [1.0.13](https://github.com/skywinder/ActionSheetPicker-3.0/tree/1.0.13) (2014-07-30)

[Full Changelog](https://github.com/skywinder/ActionSheetPicker-3.0/compare/1.0.12...1.0.13)
Expand Down

0 comments on commit df50aba

Please sign in to comment.