Skip to content

Commit

Permalink
Update workflows to checkout v4, build iPhone and Validations (#1)
Browse files Browse the repository at this point in the history
* Update validations.yml

update validations

* update checkout version github actions

* update swiftlint action to ubunut

* update to iPhone 15 build
  • Loading branch information
lucasromanomr authored Nov 29, 2024
1 parent 139912f commit 7abcccb
Show file tree
Hide file tree
Showing 7 changed files with 65 additions and 58 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/CD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,32 @@ on:
pull_request_target:
branches: [main]
types: [closed]

jobs:
release_version:
if: github.event.pull_request.milestone == null && github.event.pull_request.merged == true
runs-on: macOS-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Publish release
id: publish_release
uses: release-drafter/release-drafter@v5
with:
with:
publish: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Update podspec
- name: Update podspec
run: fastlane bump_version next_version:${{ steps.publish_release.outputs.tag_name }}

- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
branch: 'main'
commit_message: 'Bump version ${{ steps.publish_release.outputs.tag_name }}'
branch: "main"
commit_message: "Bump version ${{ steps.publish_release.outputs.tag_name }}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Deploy to Cocoapods
continue-on-error: true
Expand All @@ -38,7 +38,7 @@ jobs:
run: |
set -eo pipefail
pod lib lint --allow-warnings
pod trunk push --allow-warnings
pod trunk push --allow-warnings
- name: Tweet the release
uses: ethomson/send-tweet-action@v1
Expand All @@ -51,4 +51,4 @@ jobs:
🎉 New release ${{ steps.publish_release.outputs.tag_name }} is out 🚀
Check out all the changes here:
${{ steps.publish_release.outputs.html_url }}
${{ steps.publish_release.outputs.html_url }}
29 changes: 22 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,28 @@ jobs:
runs-on: macos-latest
strategy:
matrix:
build-config:
- { scheme: 'SkeletonView iOS', destination: 'platform=iOS Simulator,name=iPhone 8', sdk: 'iphonesimulator' }
- { scheme: 'SkeletonView tvOS', destination: 'platform=tvOS Simulator,name=Apple TV', sdk: 'appletvsimulator' }
- { scheme: 'iOS Example', destination: 'platform=iOS Simulator,name=iPhone 8', sdk: 'iphonesimulator' }
- { scheme: 'tvOS Example', destination: 'platform=tvOS Simulator,name=Apple TV', sdk: 'appletvsimulator' }
build-config:
- {
scheme: "SkeletonView iOS",
destination: "platform=iOS Simulator,name=iPhone 15",
sdk: "iphonesimulator",
}
- {
scheme: "SkeletonView tvOS",
destination: "platform=tvOS Simulator,name=Apple TV",
sdk: "appletvsimulator",
}
- {
scheme: "iOS Example",
destination: "platform=iOS Simulator,name=iPhone 15",
sdk: "iphonesimulator",
}
- {
scheme: "tvOS Example",
destination: "platform=tvOS Simulator,name=Apple TV",
sdk: "appletvsimulator",
}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Build
run: xcodebuild clean build -workspace 'SkeletonView.xcworkspace' -scheme '${{ matrix.build-config['scheme'] }}' -sdk '${{ matrix.build-config['sdk'] }}' -destination '${{ matrix.build-config['destination'] }}'

6 changes: 3 additions & 3 deletions .github/workflows/needs-attention.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ jobs:
name: Apply Needs Attention Label
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Apply Needs Attention Label
uses: hramos/needs-attention@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
response-required-label: 'awaiting user info'
needs-attention-label: 'needs triage'
response-required-label: "awaiting user info"
needs-attention-label: "needs triage"
8 changes: 4 additions & 4 deletions .github/workflows/pod_lib_lint.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
name: Pod lint
on: [workflow_dispatch]

jobs:
pod_lib_lint:
runs-on: macOS-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- env:
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
run: |
set -eo pipefail
pod lib lint --allow-warnings
pod lib lint --allow-warnings
6 changes: 3 additions & 3 deletions .github/workflows/pod_trunk.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
name: Pod trunk
on: [workflow_dispatch]

jobs:
release_version:
runs-on: macOS-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Deploy to Cocoapods
env:
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
run: |
set -eo pipefail
pod lib lint --allow-warnings
pod trunk push --allow-warnings
pod trunk push --allow-warnings
24 changes: 12 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
name: Release
on: [workflow_dispatch]

jobs:
release_version:
runs-on: macOS-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Publish release
id: publish_release
uses: release-drafter/release-drafter@v5
with:
with:
publish: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Update podspec
- name: Update podspec
run: fastlane bump_version next_version:${{ steps.publish_release.outputs.tag_name }}

- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
branch: 'main'
commit_message: 'Bump version ${{ steps.publish_release.outputs.tag_name }}'
branch: "main"
commit_message: "Bump version ${{ steps.publish_release.outputs.tag_name }}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Deploy to Cocoapods
env:
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
run: |
set -eo pipefail
pod lib lint --allow-warnings
pod trunk push --allow-warnings
pod trunk push --allow-warnings
- name: Tweet the release
uses: ethomson/send-tweet-action@v1
with:
Expand All @@ -44,4 +44,4 @@ jobs:
status: |
🎉 New release ${{ steps.publish_release.outputs.tag_name }} is out 🚀
Check out all the changes here:
${{ steps.publish_release.outputs.html_url }}
${{ steps.publish_release.outputs.html_url }}
28 changes: 10 additions & 18 deletions .github/workflows/validations.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,26 @@
name: Validations

on:
on:
pull_request_target:
branches: [main]
types: [opened, reoneped, edited, synchronized]

# workflow_dispatch:
# inputs:
# commit hash:
# description: "Commit hash"
# required: true
# default: ""

jobs:
lint:
runs-on: macos-latest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Run SwiftLint
run: swiftlint lint --reporter github-actions-logging
- uses: actions/checkout@v4
- name: GitHub Action for SwiftLint with --reporter
uses: norio-nomura/action-swiftlint@3.2.1
args: --reporter github-actions-logging

danger:
danger:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Danger
uses: docker://frmeloni/danger-swift-with-swiftlint:1.3.1
uses: docker://frmeloni/danger-swift-with-swiftlint:3.15.0
with:
args: --failOnErrors --verbose
args: --failOnErrors --verbose
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}


0 comments on commit 7abcccb

Please sign in to comment.