Skip to content

Commit 4cfe03c

Browse files
author
Maxim Lobanov
committed
Implement logic to install specific cocoapods version
1 parent 5c352f2 commit 4cfe03c

File tree

14 files changed

+7241
-2
lines changed

14 files changed

+7241
-2
lines changed

.eslintrc.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"env": {
3+
"node": true,
4+
"es6": true,
5+
"jest/globals": true
6+
},
7+
"extends": [
8+
"eslint:recommended",
9+
"plugin:@typescript-eslint/eslint-recommended",
10+
"plugin:@typescript-eslint/recommended",
11+
"plugin:jest/recommended"
12+
],
13+
"parser": "@typescript-eslint/parser",
14+
"parserOptions": {
15+
"project": "./tsconfig.eslint.json",
16+
"ecmaVersion": 2018,
17+
"sourceType": "module"
18+
},
19+
"plugins": ["@typescript-eslint", "jest"],
20+
"ignorePatterns": ["node_modules/"],
21+
"rules": {
22+
"indent": ["error", 4],
23+
"linebreak-style": ["error", "unix"],
24+
"quotes": ["error", "double"],
25+
"semi": ["error", "always"]
26+
}
27+
}

.github/workflows/test.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Validate 'setup-cocoapods'
2+
on:
3+
pull_request:
4+
schedule:
5+
- cron: 0 0 * * *
6+
7+
jobs:
8+
version-with-preinstalled:
9+
name: valid version - replace preinstalled
10+
runs-on: macos-latest
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v2
14+
15+
- name: setup-cocoapods
16+
uses: ./
17+
with:
18+
version: 1.9.0
19+
20+
- name: Validate version
21+
run: pod --version | grep "1.9.0"
22+
23+
version-without-preinstalled:
24+
name: valid version - without preinstalled
25+
runs-on: macos-latest
26+
steps:
27+
- name: Checkout
28+
uses: actions/checkout@v2
29+
30+
- name: Remove pre-installed version
31+
run: gem uninstall cocoapods --all --executables
32+
33+
- name: setup-cocoapods
34+
uses: ./
35+
with:
36+
version: 1.5.3
37+
38+
- name: Validate version
39+
run: pod --version | grep "1.5.3"
40+
41+
version-latest:
42+
name: latest version
43+
runs-on: macos-latest
44+
steps:
45+
- name: Checkout
46+
uses: actions/checkout@v2
47+
48+
- name: setup-cocoapods
49+
uses: ./
50+
with:
51+
version: latest

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules/
2+
lib

LICENSE

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
2+
The MIT License (MIT)
3+
4+
Copyright (c) 2020 Maxim Lobanov and contributors
5+
6+
Permission is hereby granted, free of charge, to any person obtaining a copy
7+
of this software and associated documentation files (the "Software"), to deal
8+
in the Software without restriction, including without limitation the rights
9+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
copies of the Software, and to permit persons to whom the Software is
11+
furnished to do so, subject to the following conditions:
12+
13+
The above copyright notice and this permission notice shall be included in
14+
all copies or substantial portions of the Software.
15+
16+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22+
THE SOFTWARE.

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +0,0 @@
1-
# setup-cocoapods
2-
Set up your GitHub Actions workflow with a specific version of Cocoapods

action.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: 'Setup Cocoapods'
2+
author: 'Maxim Lobanov'
3+
description: 'Set up your GitHub Actions workflow with a specific version of Cocoapods'
4+
inputs:
5+
version:
6+
description: 'Version of Cocoapods to install'
7+
required: false
8+
podfile-path:
9+
description: 'Path to Podfile.lock file to determine cocoapods version'
10+
required: false
11+
runs:
12+
using: 'node12'
13+
main: 'dist/index.js'
14+
branding:
15+
icon: 'code'
16+
color: 'yellow'

0 commit comments

Comments
 (0)