Skip to content
This repository was archived by the owner on Apr 14, 2023. It is now read-only.

Commit 47511dd

Browse files
authored
Merge pull request #302 from UziTech/find-channel
2 parents b60b799 + a4b222d commit 47511dd

File tree

7 files changed

+146
-155
lines changed

7 files changed

+146
-155
lines changed

.github/workflows/test.yml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,14 @@ jobs:
2323
- name: Build Action
2424
if: matrix.source == 'action'
2525
run: npm run build
26-
- name: Install Atom with Action
27-
if: matrix.source == 'action' && matrix.version == 'stable'
28-
uses: ./
2926
- name: Install Atom ${{ matrix.version }} with Action
30-
if: matrix.source == 'action' && matrix.version != 'stable'
27+
if: matrix.source == 'action'
3128
uses: ./
3229
with:
3330
version: ${{ matrix.version }}
34-
- name: Install Atom with NPM
35-
if: matrix.source == 'npm' && matrix.version == 'stable'
36-
run: node ./src/action.js
3731
- name: Install Atom ${{ matrix.version }} with NPM
38-
if: matrix.source == 'npm' && matrix.version != 'stable'
39-
run: node ./src/action.js ${{ matrix.version }}
32+
if: matrix.source == 'npm'
33+
run: node ./src/action.js ${{ matrix.version }} ${{ secrets.GITHUB_TOKEN }}
4034
- name: Don't download to repo directory
4135
run: git add . -N && git diff --name-only --exit-code -- . ':!dist'
4236
- name: Run Specs

README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,18 @@ This may be used as an [action](#github-action) in GitHub Actions or run with `n
1616

1717
The version to test. Default `stable`.
1818

19-
Possible values: `stable`, `beta`, `nightly`, `dev`, Any Atom [release](https://github.com/atom/atom/releases) tag >= `v1.0.0` (e.g. `v1.50.0` or `v1.50.0-beta0`)
19+
Possible values: `stable`, `beta`, Any Atom [release](https://github.com/atom/atom/releases) tag >= `v1.0.0` (e.g. `v1.50.0` or `v1.50.0-beta0`)
20+
21+
#### `token`
22+
23+
A GitHub token with read permission. Default `secrets.GITHUB_TOKEN`.
24+
25+
The token is used to search Atom releases to find the latest `stable` and `beta` versions.
2026

2127
### Example usage
2228

2329
```yml
24-
uses: UziTech/action-setup-atom@v2
30+
uses: UziTech/action-setup-atom@v3
2531
with:
2632
version: 'beta'
2733
```
@@ -40,7 +46,7 @@ jobs:
4046
runs-on: ${{ matrix.os }}
4147
steps:
4248
- uses: actions/checkout@v2
43-
- uses: UziTech/action-setup-atom@v2
49+
- uses: UziTech/action-setup-atom@v3
4450
with:
4551
version: ${{ matrix.version }}
4652
- name: Atom version

action.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,15 @@ name: 'Setup Atom'
22
description: 'Setup Atom and APM'
33
inputs:
44
version:
5-
description: 'Version'
6-
required: true
7-
default: 'Stable'
5+
description: 'Version, defaults to "stable"'
6+
required: false
7+
default: 'stable'
8+
token:
9+
description: 'GitHub token with read permission for finding stable and beta versions, defaults to secrets.GITHUB_TOKEN'
10+
required: false
11+
default: ${{ github.token }}
812
runs:
9-
using: 'node12'
13+
using: 'node16'
1014
main: 'dist/index.js'
1115
branding:
1216
icon: 'code'

0 commit comments

Comments
 (0)