Skip to content

Commit 1341dd8

Browse files
authored
feat: latest (#7)
* feat: latest * octokit * docs: readme
1 parent 9d50681 commit 1341dd8

File tree

8 files changed

+10717
-774
lines changed

8 files changed

+10717
-774
lines changed

.github/workflows/ci.yml

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,40 @@ jobs:
2525
key: deno-${{ hashFiles('deno.lock') }}
2626
- run: just ci
2727

28-
test:
29-
runs-on: ${{ matrix.os }}
28+
test-default:
3029
strategy:
3130
matrix:
3231
os:
3332
- ubuntu-latest
3433
- macos-latest
3534
- windows-latest
35+
runs-on: ${{ matrix.os }}
3636
steps:
3737
- uses: actions/checkout@v4
38+
- uses: ./
39+
- run: flatc --version
3840

41+
test-semver:
42+
strategy:
43+
matrix:
44+
os:
45+
- ubuntu-latest
46+
- macos-latest
47+
- windows-latest
48+
version:
49+
- "24.12.23"
50+
- "24.3.25"
51+
runs-on: ${{ matrix.os }}
52+
steps:
53+
- uses: actions/checkout@v4
3954
- uses: ./
4055
with:
41-
version: "24.3.25"
42-
43-
- run: flatc --version
56+
version: ${{ matrix.version }}
57+
- shell: bash
58+
run: |
59+
ACTUAL=$(flatc --version)
60+
EXPECTED="flatc version ${{ matrix.version }}"
61+
if [ "$ACTUAL" != "$EXPECTED" ]; then
62+
echo "Expected '$EXPECTED', got '$ACTUAL'"
63+
exit 1
64+
fi

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,18 @@ for use in your workflows.
55

66
## Usage
77

8+
Install the latest version:
9+
10+
```yaml
11+
- name: Install latest flatc
12+
uses: Nugine/setup-flatc@v1
13+
```
14+
15+
Install a specific version:
16+
817
```yaml
918
- name: Install flatc
1019
uses: Nugine/setup-flatc@v1
1120
with:
12-
version: "24.3.25"
21+
version: "24.12.23"
1322
```

action.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,12 @@ branding:
88
inputs:
99
version:
1010
description: "The version of flatc to install"
11-
required: true
11+
required: false
12+
default: "latest"
13+
github-token:
14+
description: "GITHUB_TOKEN"
15+
required: false
16+
default: ${{ github.token }}
1217

1318
runs:
1419
using: "node20"

deno.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
"@actions/core": "npm:@actions/core@^1.11.1",
88
"@actions/tool-cache": "npm:@actions/tool-cache@^2.0.1",
99
"@deno/dnt": "jsr:@deno/dnt@^0.41.3",
10-
"esbuild": "npm:esbuild@^0.24.0"
10+
"@std/semver": "jsr:@std/semver@^1.0.3",
11+
"esbuild": "npm:esbuild@^0.24.0",
12+
"octokit": "npm:octokit@^4.0.3"
1113
}
1214
}

deno.lock

Lines changed: 238 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)