github-action-yaml 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +33 -0
- package/package.json +5 -1
- package/.changeset/README.md +0 -8
- package/.changeset/config.json +0 -11
- package/.github/CODEOWNERS +0 -5
- package/.github/FUNDING.yml +0 -13
- package/.github/actions/setup/action.yml +0 -32
- package/.github/renovate.json +0 -9
- package/.github/workflows/changeset-for-renovate.yml +0 -29
- package/.github/workflows/check-pr.yml +0 -43
- package/.github/workflows/release.yml +0 -56
- package/.github/workflows/wait-for-workflows.yaml +0 -18
- package/.node-version +0 -1
- package/CHANGELOG.md +0 -7
- package/biome.json +0 -29
- package/tsconfig.json +0 -10
- package/tsup.config.ts +0 -10
package/README.md
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
# github-action-yaml
|
2
|
+
|
3
|
+
## Install
|
4
|
+
|
5
|
+
```bash
|
6
|
+
npm install github-action-yaml
|
7
|
+
```
|
8
|
+
|
9
|
+
## Usage
|
10
|
+
|
11
|
+
```sh
|
12
|
+
npx github-action-yaml generate ./src/generated/github-action.ts
|
13
|
+
```
|
14
|
+
|
15
|
+
## Example
|
16
|
+
|
17
|
+
```ts
|
18
|
+
import { parseInputs } from './generated/github-action';
|
19
|
+
|
20
|
+
const main = () => {
|
21
|
+
const inputs = parseInputs()
|
22
|
+
}
|
23
|
+
|
24
|
+
main()
|
25
|
+
```
|
26
|
+
|
27
|
+
### Generate Options
|
28
|
+
|
29
|
+
| Option | Description | Default | Required |
|
30
|
+
| --------------- | ----------- | ------------ | -------- |
|
31
|
+
| `output` | Output file | | true |
|
32
|
+
| `-i`, `--input` | Input file | `action.yml` | false |
|
33
|
+
| `--watch` | Watch mode | | false |
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "github-action-yaml",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.2",
|
4
4
|
"type": "module",
|
5
5
|
"bin": {
|
6
6
|
"github-action-yaml": "./dist/bin/action-yaml.js"
|
@@ -8,6 +8,10 @@
|
|
8
8
|
"main": "./dist/index.cjs",
|
9
9
|
"module": "./dist/index.js",
|
10
10
|
"types": "./dist/index.d.ts",
|
11
|
+
"files": [
|
12
|
+
"dist",
|
13
|
+
"src"
|
14
|
+
],
|
11
15
|
"keywords": [],
|
12
16
|
"author": "YutaUra",
|
13
17
|
"license": "ISC",
|
package/.changeset/README.md
DELETED
@@ -1,8 +0,0 @@
|
|
1
|
-
# Changesets
|
2
|
-
|
3
|
-
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
|
4
|
-
with multi-package repos, or single-package repos to help you version and publish your code. You can
|
5
|
-
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
|
6
|
-
|
7
|
-
We have a quick list of common questions to get you started engaging with this project in
|
8
|
-
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
|
package/.changeset/config.json
DELETED
@@ -1,11 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"$schema": "https://unpkg.com/@changesets/config@3.0.3/schema.json",
|
3
|
-
"changelog": "@changesets/cli/changelog",
|
4
|
-
"commit": false,
|
5
|
-
"fixed": [],
|
6
|
-
"linked": [],
|
7
|
-
"access": "restricted",
|
8
|
-
"baseBranch": "main",
|
9
|
-
"updateInternalDependencies": "patch",
|
10
|
-
"ignore": []
|
11
|
-
}
|
package/.github/CODEOWNERS
DELETED
package/.github/FUNDING.yml
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
# These are supported funding model platforms
|
2
|
-
|
3
|
-
github: [YutaUra] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
|
4
|
-
patreon: # Replace with a single Patreon username
|
5
|
-
open_collective: # Replace with a single Open Collective username
|
6
|
-
ko_fi: # Replace with a single Ko-fi username
|
7
|
-
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
8
|
-
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
9
|
-
liberapay: # Replace with a single Liberapay username
|
10
|
-
issuehunt: # Replace with a single IssueHunt username
|
11
|
-
otechie: # Replace with a single Otechie username
|
12
|
-
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
|
13
|
-
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
@@ -1,32 +0,0 @@
|
|
1
|
-
name: Setup
|
2
|
-
|
3
|
-
description: |
|
4
|
-
setup fot github actions
|
5
|
-
|
6
|
-
inputs:
|
7
|
-
token:
|
8
|
-
description: The token to use for the setup.
|
9
|
-
required: true
|
10
|
-
bot-app-slug:
|
11
|
-
description: The app slug for the bot.
|
12
|
-
required: true
|
13
|
-
|
14
|
-
runs:
|
15
|
-
using: composite
|
16
|
-
steps:
|
17
|
-
- name: Setup Git User
|
18
|
-
shell: bash
|
19
|
-
run: |
|
20
|
-
user_name=${{ inputs.bot-app-slug }}[bot]
|
21
|
-
user_email=$(gh api "/users/${{ inputs.bot-app-slug }}[bot]" --jq .id)+${{ inputs.bot-app-slug }}[bot]@users.noreply.github.com
|
22
|
-
echo "Setting up git user: $user_name <$user_email>"
|
23
|
-
git config --global user.name $user_name
|
24
|
-
git config --global user.email $user_email
|
25
|
-
env:
|
26
|
-
GH_TOKEN: ${{ inputs.token }}
|
27
|
-
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
|
28
|
-
with:
|
29
|
-
node-version-file: .node-version
|
30
|
-
- name: Setup pnpm
|
31
|
-
shell: bash
|
32
|
-
run: corepack enable pnpm
|
package/.github/renovate.json
DELETED
@@ -1,9 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"extends": ["github>yutaura/renovate-oss-base"],
|
3
|
-
"gitIgnoredAuthors": [
|
4
|
-
"github-actions[bot]@users.noreply.github.com",
|
5
|
-
"41898282+github-actions[bot]@users.noreply.github.com",
|
6
|
-
"yutaura-bot[bot]@users.noreply.github.com",
|
7
|
-
"179370226+yutaura-bot[bot]@users.noreply.github.com"
|
8
|
-
]
|
9
|
-
}
|
@@ -1,29 +0,0 @@
|
|
1
|
-
name: create changeset for PR created by Renovate
|
2
|
-
|
3
|
-
on:
|
4
|
-
pull_request:
|
5
|
-
branches:
|
6
|
-
- main
|
7
|
-
|
8
|
-
jobs:
|
9
|
-
default:
|
10
|
-
runs-on: ubuntu-latest
|
11
|
-
# commit author should be renovate[bot]
|
12
|
-
if: startsWith(github.head_ref, 'renovate/') && github.event.pull_request.user.login == 'renovate[bot]' && github.actor == 'renovate[bot]'
|
13
|
-
steps:
|
14
|
-
- uses: actions/create-github-app-token@5d869da34e18e7287c1daad50e0b8ea0f506ce69 # v1.11.0
|
15
|
-
id: app-token
|
16
|
-
with:
|
17
|
-
app-id: ${{ secrets.BOT_APP_ID }}
|
18
|
-
private-key: ${{ secrets.BOT_PRIVATE_KEY }}
|
19
|
-
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
|
20
|
-
with:
|
21
|
-
token: ${{ steps.app-token.outputs.token }}
|
22
|
-
- uses: ./.github/actions/setup
|
23
|
-
with:
|
24
|
-
token: ${{ steps.app-token.outputs.token }}
|
25
|
-
bot-app-slug: ${{ steps.app-token.outputs.app-slug }}
|
26
|
-
- uses: YutaUra/actions/renovate-changeset@7b5494b1dbff5ee9b4dd4610ee3daf807b473149 # v0.0.5
|
27
|
-
with:
|
28
|
-
token: ${{ steps.app-token.outputs.token }}
|
29
|
-
setup-git-user: false
|
@@ -1,43 +0,0 @@
|
|
1
|
-
name: check_PR
|
2
|
-
|
3
|
-
on:
|
4
|
-
pull_request:
|
5
|
-
branches:
|
6
|
-
- main
|
7
|
-
push:
|
8
|
-
branches:
|
9
|
-
- main
|
10
|
-
|
11
|
-
concurrency:
|
12
|
-
group: ${{ github.workflow }}-${{ github.ref }}
|
13
|
-
cancel-in-progress: true
|
14
|
-
|
15
|
-
jobs:
|
16
|
-
check-pr:
|
17
|
-
runs-on: ubuntu-latest
|
18
|
-
steps:
|
19
|
-
- uses: actions/create-github-app-token@5d869da34e18e7287c1daad50e0b8ea0f506ce69 # v1.11.0
|
20
|
-
id: app-token
|
21
|
-
with:
|
22
|
-
app-id: ${{ secrets.BOT_APP_ID }}
|
23
|
-
private-key: ${{ secrets.BOT_PRIVATE_KEY }}
|
24
|
-
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
|
25
|
-
with:
|
26
|
-
token: ${{ steps.app-token.outputs.token }}
|
27
|
-
- uses: ./.github/actions/setup
|
28
|
-
with:
|
29
|
-
token: ${{ steps.app-token.outputs.token }}
|
30
|
-
bot-app-slug: ${{ steps.app-token.outputs.app-slug }}
|
31
|
-
|
32
|
-
- uses: actions/setup-java@b36c23c0d998641eff861008f374ee103c25ac73 # v4.4.0
|
33
|
-
with:
|
34
|
-
distribution: "temurin"
|
35
|
-
java-version: "17"
|
36
|
-
|
37
|
-
- run: pnpm install
|
38
|
-
- run: pnpm exec biome check --fix
|
39
|
-
|
40
|
-
- uses: int128/update-generated-files-action@757376506709ed3d87f14a80ca28a98736d52236 # v2.55.0
|
41
|
-
if: always()
|
42
|
-
with:
|
43
|
-
token: ${{ steps.app-token.outputs.token }}
|
@@ -1,56 +0,0 @@
|
|
1
|
-
name: release
|
2
|
-
|
3
|
-
on:
|
4
|
-
push:
|
5
|
-
branches:
|
6
|
-
- main
|
7
|
-
pull_request:
|
8
|
-
branches:
|
9
|
-
- main
|
10
|
-
paths:
|
11
|
-
- .github/workflows/release.yml
|
12
|
-
- .github/actions/setup/**
|
13
|
-
|
14
|
-
concurrency: ${{ github.workflow }}-${{ github.ref }}
|
15
|
-
|
16
|
-
permissions:
|
17
|
-
contents: write
|
18
|
-
pull-requests: write
|
19
|
-
|
20
|
-
jobs:
|
21
|
-
release:
|
22
|
-
name: Release
|
23
|
-
runs-on: ubuntu-latest
|
24
|
-
steps:
|
25
|
-
- uses: actions/create-github-app-token@5d869da34e18e7287c1daad50e0b8ea0f506ce69 # v1.11.0
|
26
|
-
id: app-token
|
27
|
-
with:
|
28
|
-
app-id: ${{ secrets.BOT_APP_ID }}
|
29
|
-
private-key: ${{ secrets.BOT_PRIVATE_KEY }}
|
30
|
-
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
|
31
|
-
with:
|
32
|
-
token: ${{ steps.app-token.outputs.token }}
|
33
|
-
- uses: ./.github/actions/setup
|
34
|
-
with:
|
35
|
-
token: ${{ steps.app-token.outputs.token }}
|
36
|
-
bot-app-slug: ${{ steps.app-token.outputs.app-slug }}
|
37
|
-
|
38
|
-
- name: Install Dependencies
|
39
|
-
run: pnpm install
|
40
|
-
|
41
|
-
- name: Create Release Pull Request or Publish to npm
|
42
|
-
id: changesets
|
43
|
-
if: github.event_name == 'push'
|
44
|
-
uses: changesets/action@v1
|
45
|
-
with:
|
46
|
-
# This expects you to have a script called release which does a build for your packages and calls changeset publish
|
47
|
-
publish: pnpm publish
|
48
|
-
setupGitUser: false
|
49
|
-
env:
|
50
|
-
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
|
51
|
-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
52
|
-
|
53
|
-
- if: ${{ steps.changesets.outputs.pullRequestNumber != '' }}
|
54
|
-
run: gh pr merge --merge --auto "${{ steps.changesets.outputs.pullRequestNumber}}"
|
55
|
-
env:
|
56
|
-
GH_TOKEN: ${{ steps.app-token.outputs.token }}
|
@@ -1,18 +0,0 @@
|
|
1
|
-
name: wait-for-workflows
|
2
|
-
|
3
|
-
on:
|
4
|
-
pull_request:
|
5
|
-
|
6
|
-
jobs:
|
7
|
-
wait-for-workflows:
|
8
|
-
runs-on: ubuntu-latest
|
9
|
-
timeout-minutes: 30
|
10
|
-
steps:
|
11
|
-
- uses: actions/create-github-app-token@5d869da34e18e7287c1daad50e0b8ea0f506ce69 # v1.11.0
|
12
|
-
id: app-token
|
13
|
-
with:
|
14
|
-
app-id: ${{ secrets.BOT_APP_ID }}
|
15
|
-
private-key: ${{ secrets.BOT_PRIVATE_KEY }}
|
16
|
-
- uses: int128/wait-for-workflows-action@a1d37b9f6c1b3a092780ec646297224afc9faf5a # v1.26.0
|
17
|
-
with:
|
18
|
-
token: ${{ steps.app-token.outputs.token }}
|
package/.node-version
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
20.18.0
|
package/CHANGELOG.md
DELETED
package/biome.json
DELETED
@@ -1,29 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
|
3
|
-
"vcs": {
|
4
|
-
"enabled": true,
|
5
|
-
"clientKind": "git",
|
6
|
-
"useIgnoreFile": true
|
7
|
-
},
|
8
|
-
"formatter": {
|
9
|
-
"enabled": true,
|
10
|
-
"indentStyle": "space"
|
11
|
-
},
|
12
|
-
"organizeImports": {
|
13
|
-
"enabled": true
|
14
|
-
},
|
15
|
-
"linter": {
|
16
|
-
"enabled": true,
|
17
|
-
"rules": {
|
18
|
-
"recommended": true
|
19
|
-
}
|
20
|
-
},
|
21
|
-
"javascript": {
|
22
|
-
"formatter": {
|
23
|
-
"quoteStyle": "double"
|
24
|
-
}
|
25
|
-
},
|
26
|
-
"files": {
|
27
|
-
"ignore": ["generated/**"]
|
28
|
-
}
|
29
|
-
}
|
package/tsconfig.json
DELETED