Skip to content
This repository was archived by the owner on Sep 23, 2024. It is now read-only.

Commit d80da53

Browse files
committed
v0.0.1
1 parent a08294b commit d80da53

File tree

11 files changed

+14922
-105
lines changed

11 files changed

+14922
-105
lines changed

.github/workflows/test.yaml

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
defaults:
10+
run:
11+
shell: bash
12+
13+
jobs:
14+
test:
15+
name: Test
16+
runs-on: ${{ matrix.os }}
17+
strategy:
18+
matrix:
19+
os: [macos-latest, ubuntu-latest]
20+
version: [1.1.0, 1.0.0]
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v2
24+
25+
- name: Setup baselime
26+
uses: ./
27+
with:
28+
version: ${{ matrix.version }}
29+
30+
- name: Capture baselime version installed
31+
run: |
32+
export BASELIME_VERSION=$( baselime --version )
33+
echo 'BASELIME_VERSION_INSTALLED<<EOF' >> $GITHUB_ENV
34+
baselime --version >> $GITHUB_ENV
35+
echo 'EOF' >> $GITHUB_ENV
36+
37+
- name: Verify
38+
shell: python
39+
env:
40+
BASELIME_VERSION_EXPECTED: ${{ matrix.version }}
41+
run: |
42+
import sys, os
43+
sys.exit(
44+
int(not os.environ["BASELIME_VERSION_EXPECTED"] in os.environ["BASELIME_VERSION_INSTALLED"])
45+
)

.gitignore

+1-104
Original file line numberDiff line numberDiff line change
@@ -1,104 +1 @@
1-
# Logs
2-
logs
3-
*.log
4-
npm-debug.log*
5-
yarn-debug.log*
6-
yarn-error.log*
7-
lerna-debug.log*
8-
9-
# Diagnostic reports (https://nodejs.org/api/report.html)
10-
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
11-
12-
# Runtime data
13-
pids
14-
*.pid
15-
*.seed
16-
*.pid.lock
17-
18-
# Directory for instrumented libs generated by jscoverage/JSCover
19-
lib-cov
20-
21-
# Coverage directory used by tools like istanbul
22-
coverage
23-
*.lcov
24-
25-
# nyc test coverage
26-
.nyc_output
27-
28-
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
29-
.grunt
30-
31-
# Bower dependency directory (https://bower.io/)
32-
bower_components
33-
34-
# node-waf configuration
35-
.lock-wscript
36-
37-
# Compiled binary addons (https://nodejs.org/api/addons.html)
38-
build/Release
39-
40-
# Dependency directories
41-
node_modules/
42-
jspm_packages/
43-
44-
# TypeScript v1 declaration files
45-
typings/
46-
47-
# TypeScript cache
48-
*.tsbuildinfo
49-
50-
# Optional npm cache directory
51-
.npm
52-
53-
# Optional eslint cache
54-
.eslintcache
55-
56-
# Microbundle cache
57-
.rpt2_cache/
58-
.rts2_cache_cjs/
59-
.rts2_cache_es/
60-
.rts2_cache_umd/
61-
62-
# Optional REPL history
63-
.node_repl_history
64-
65-
# Output of 'npm pack'
66-
*.tgz
67-
68-
# Yarn Integrity file
69-
.yarn-integrity
70-
71-
# dotenv environment variables file
72-
.env
73-
.env.test
74-
75-
# parcel-bundler cache (https://parceljs.org/)
76-
.cache
77-
78-
# Next.js build output
79-
.next
80-
81-
# Nuxt.js build / generate output
82-
.nuxt
83-
dist
84-
85-
# Gatsby files
86-
.cache/
87-
# Comment in the public line in if your project uses Gatsby and *not* Next.js
88-
# https://nextjs.org/blog/next-9-1#public-directory-support
89-
# public
90-
91-
# vuepress build output
92-
.vuepress/dist
93-
94-
# Serverless directories
95-
.serverless/
96-
97-
# FuseBox cache
98-
.fusebox/
99-
100-
# DynamoDB Local files
101-
.dynamodb/
102-
103-
# TernJS port file
104-
.tern-port
1+
node_modules

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Changelog
2+
3+
4+
## 0.0.1 (30th September 2022)
5+
6+
- Initial release

CONTRIBUTING.md

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Contributing to Baselime Github Setup Action
2+
3+
You want to help improve the Baselime Github Setup Action? Awesome, thank you!
4+
5+
## Reporting Issues
6+
7+
Bugs, feature requests, and development-related questions should be directed to our [GitHub issue tracker](https://github.com/baselime/action-setup-baselime/issues).
8+
9+
When reporting a bug, please try and provide as much context as possible such as your operating system, Node version, and anything else that might be relevant to the bug. For feature requests, please explain what you're trying to do, and how the requested feature would help you do that.
10+
11+
## Building and Packaging the project
12+
13+
### Prerequisites:
14+
15+
- Node 16.15+ Installed.
16+
17+
```shell
18+
$ npm run build
19+
```
20+
21+
- Packaging the binary
22+
23+
```shell
24+
# Linux
25+
$ npm run package:linux
26+
27+
# MacOS
28+
$ npm run package:macos
29+
```
30+
31+
## Setup
32+
33+
[Fork](https://github.com/baselime/action-setup-baselime) then clone this repository:
34+
35+
```bash
36+
$ git clone https://github.com/baselime/action-setup-baselime.git
37+
$ cd action-setup-baselime
38+
$ npm ci
39+
```
40+
41+
Install [@vercel/ncc](https://www.npmjs.com/package/@vercel/ncc)
42+
43+
```bash
44+
$ npm i -g @vercel/ncc
45+
```
46+
47+
Compile the module into a single file after making you changes
48+
49+
```bash
50+
$ npm run compile
51+
```

README.md

+59-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,60 @@
11
# action-setup-baselime
2-
Setup the Baselime CLI in Github actions
2+
3+
# :gear: `setup-baselime` ![](https://github.com/Baselime/action-setup-baselime/workflows/Tests/badge.svg)
4+
> Setup the Baselime CLI in Github actions
5+
6+
## About
7+
This action sets up the [Baselime CLI](https://docs.baselime.io/cli/overview/) in Github Actions.
8+
9+
This action can be run on `ubuntu-latest`, and `macos-latest` GitHub Actions runners, and will install and expose a specified version of the `baselime` CLI on the runner environment.
10+
11+
## Usage
12+
13+
Setup the `baselime` CLI:
14+
15+
```yaml
16+
steps:
17+
- uses: baselime/[email protected]
18+
with:
19+
baselime-api-key: <YOUR_API_KEY> # Can be imported from Github Actions Secrets
20+
```
21+
22+
A specific version of the `baselime` CLI can be installed:
23+
24+
```yaml
25+
steps:
26+
- uses: baselime/setup-baselime@v1
27+
with:
28+
baselime-api-key: <YOUR_API_KEY> # Can be imported from Github Actions Secrets
29+
version:
30+
0.0.18
31+
```
32+
33+
## Inputs
34+
The actions supports the following inputs:
35+
36+
- `baselime-api-key`: The API key to use with the Baselime CLI. You can get your API key by running `baselime auth status` in your local terminal or through the Baselime console
37+
- `version`: The version of `baselime` to install, defaulting to the latest version
38+
39+
## Contributing
40+
41+
Feel free to submit PRs or to fill issues. Every kind of help is appreciated.
42+
43+
Kindly check our [Contributing](Contributing.md) guide on how to propose
44+
bugfixes and improvements, and submitting pull requests to the project.
45+
46+
## License
47+
48+
&copy; Baselime Limited, 2022
49+
50+
Distributed under MIT License (`The MIT License`).
51+
52+
See [LICENSE](LICENSE) for more information.
53+
54+
<!-- Badges -->
55+
56+
[docs]: https://docs.baselime.io
57+
[docs_badge]: https://img.shields.io/badge/docs-reference-blue.svg?style=flat-square
58+
[license]: https://opensource.org/licenses/MIT
59+
[license_badge]: https://img.shields.io/github/license/baselime/cli.svg?color=blue&style=flat-square&ghcache=unused
60+

action.yml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: 'setup-baselime'
2+
description: 'Install Baselime CLI on Github Actions runners'
3+
inputs:
4+
baselime-api-key: # id of input
5+
description: 'Api Key'
6+
required: true
7+
version:
8+
description: 'Version of the Baselime CLI to install'
9+
required: false
10+
runs:
11+
using: 'node16'
12+
main: 'dist/index.js'

0 commit comments

Comments
 (0)