Skip to content

Commit 67d9b39

Browse files
authored
v3 (#823)
* convert to composite action * fix readme * fix step name
1 parent 2402de7 commit 67d9b39

18 files changed

Lines changed: 75 additions & 24254 deletions

.eslintignore

Lines changed: 0 additions & 3 deletions
This file was deleted.

.eslintrc.json

Lines changed: 0 additions & 18 deletions
This file was deleted.

.github/dependabot.yml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,3 @@ updates:
77
day: "saturday"
88
labels:
99
- "dependencies"
10-
11-
- package-ecosystem: "npm"
12-
directory: "/"
13-
schedule:
14-
interval: "weekly"
15-
day: "saturday"
16-
ignore:
17-
- dependency-name: "*"
18-
update-types: ["version-update:semver-major"]
19-
labels:
20-
- "dependencies"
21-

.github/workflows/ci-test-command.yml

Lines changed: 0 additions & 94 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 8 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,6 @@ jobs:
2020
runs-on: ubuntu-latest
2121
steps:
2222
- uses: actions/checkout@v3
23-
- uses: actions/setup-node@v3
24-
with:
25-
node-version: 16.x
26-
- run: npm ci
27-
- run: npm run build
28-
- run: npm run format-check
29-
- run: npm run lint
30-
- run: npm run test
31-
- uses: actions/upload-artifact@v3
32-
with:
33-
name: dist
34-
path: dist
3523
- uses: actions/upload-artifact@v3
3624
with:
3725
name: action.yml
@@ -40,21 +28,15 @@ jobs:
4028
test:
4129
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository
4230
needs: [build]
43-
runs-on: ubuntu-latest
4431
strategy:
4532
matrix:
46-
target: [built, committed]
33+
os: [windows-latest, ubuntu-latest, macos-latest]
34+
runs-on: ${{ matrix.os }}
4735
steps:
4836
- uses: actions/checkout@v3
4937
with:
5038
ref: main
51-
- if: matrix.target == 'built' || github.event_name == 'pull_request'
52-
uses: actions/download-artifact@v3
53-
with:
54-
name: dist
55-
path: dist
56-
- if: matrix.target == 'built' || github.event_name == 'pull_request'
57-
uses: actions/download-artifact@v3
39+
- uses: actions/download-artifact@v3
5840
with:
5941
name: action.yml
6042
path: .
@@ -66,43 +48,19 @@ jobs:
6648
id: cpr
6749
uses: peter-evans/create-pull-request@v4
6850
with:
69-
commit-message: '[CI] test ${{ matrix.target }}'
70-
title: '[CI] test ${{ matrix.target }}'
51+
commit-message: '[CI] test ${{ matrix.os }}'
52+
title: '[CI] test ${{ matrix.os }}'
7153
body: |
72-
- CI test case for target '${{ matrix.target }}'
54+
- CI test case for target '${{ matrix.os }}'
7355
7456
Auto-generated by [create-pull-request][1]
7557
7658
[1]: https://github.com/peter-evans/create-pull-request
77-
branch: ci-test-${{ matrix.target }}-${{ github.sha }}
59+
branch: ci-test-${{ matrix.os }}-${{ github.sha }}
7860

7961
- name: Close Pull
8062
uses: ./
8163
with:
8264
pull-request-number: ${{ steps.cpr.outputs.pull-request-number }}
83-
comment: '[CI] test ${{ matrix.target }}'
65+
comment: '[CI] test ${{ matrix.os }}'
8466
delete-branch: true
85-
86-
package:
87-
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
88-
needs: [test]
89-
runs-on: ubuntu-latest
90-
steps:
91-
- uses: actions/checkout@v3
92-
- uses: actions/download-artifact@v3
93-
with:
94-
name: dist
95-
path: dist
96-
- name: Create Pull Request
97-
uses: peter-evans/create-pull-request@v4
98-
with:
99-
token: ${{ secrets.ACTIONS_BOT_TOKEN }}
100-
commit-message: Update distribution
101-
title: Update distribution
102-
body: |
103-
- Updates the distribution for changes on `main`
104-
105-
Auto-generated by [create-pull-request][1]
106-
107-
[1]: https://github.com/peter-evans/create-pull-request
108-
branch: update-distribution

.github/workflows/slash-command-dispatch.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,5 @@ jobs:
1717
"permission": "admin",
1818
"repository": "peter-evans/slash-command-dispatch-processor",
1919
"issue_type": "pull-request"
20-
},
21-
{
22-
"command": "ci-test",
23-
"permission": "admin",
24-
"issue_type": "pull-request"
2520
}
2621
]
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Update Major Version
2+
run-name: Update ${{ github.event.inputs.main_version }} to ${{ github.event.inputs.target }}
3+
4+
on:
5+
workflow_dispatch:
6+
inputs:
7+
target:
8+
description: The target tag or reference
9+
required: true
10+
main_version:
11+
type: choice
12+
description: The major version tag to update
13+
options:
14+
- v2
15+
- v3
16+
17+
jobs:
18+
tag:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v3
22+
with:
23+
token: ${{ secrets.ACTIONS_BOT_TOKEN }}
24+
fetch-depth: 0
25+
- name: Git config
26+
run: |
27+
git config user.name actions-bot
28+
git config user.email [email protected]
29+
- name: Tag new target
30+
run: git tag -f ${{ github.event.inputs.main_version }} ${{ github.event.inputs.target }}
31+
- name: Push new tag
32+
run: git push origin ${{ github.event.inputs.main_version }} --force

.gitignore

Lines changed: 0 additions & 2 deletions
This file was deleted.

.prettierignore

Lines changed: 0 additions & 3 deletions
This file was deleted.

.prettierrc.json

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)