Skip to content

Commit 937f253

Browse files
committed
ci: use actionspack to bundle workflows
1 parent 6c92bcd commit 937f253

15 files changed

Lines changed: 374 additions & 44 deletions

.github/renovate.json5

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
{
22
extends: ['github>sxzz/renovate-config'],
33
automerge: true,
4+
packageRules: [
5+
{
6+
matchManagers: ['github-actions'],
7+
enabled: false,
8+
},
9+
],
410
}

.github/workflow.lock.yml

Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
lockfileVersion: 1
2+
entries:
3+
.github/workflows/src/autofix.yml:
4+
output: .github/workflows/autofix.yml
5+
dependencies:
6+
- package: github:sxzz/workflows/.github/workflows/autofix.yml
7+
requested: main
8+
foundAt: .github/workflows/src/autofix.yml#jobs.autofix.uses
9+
.github/workflows/src/release-commit.yml:
10+
output: .github/workflows/release-commit.yml
11+
dependencies:
12+
- package: github:sxzz/workflows/.github/workflows/release-commit.yml
13+
requested: main
14+
foundAt: .github/workflows/src/release-commit.yml#jobs.release.uses
15+
.github/workflows/src/release.yml:
16+
output: .github/workflows/release.yml
17+
dependencies:
18+
- package: github:sxzz/workflows/.github/workflows/release.yml
19+
requested: main
20+
foundAt: .github/workflows/src/release.yml#jobs.release.uses
21+
.github/workflows/src/unit-test.yml:
22+
output: .github/workflows/unit-test.yml
23+
dependencies:
24+
- package: github:sxzz/workflows/.github/workflows/unit-test.yml
25+
requested: main
26+
foundAt: .github/workflows/src/unit-test.yml#jobs.unit-test.uses
27+
packages:
28+
github:actions/checkout:
29+
source: github
30+
owner: actions
31+
repo: checkout
32+
path: .
33+
type: external-action
34+
external: true
35+
contentDigest: sha256:11b63452f6e43ffb5ab8bfdaaafb8a915b354318e3ad9bce4eb0686b9e380f90
36+
dependencies: []
37+
requested: de0fac2e4500dabe0009e67214ff5f5447ce83dd
38+
resolved: de0fac2e4500dabe0009e67214ff5f5447ce83dd
39+
github:actions/setup-node:
40+
source: github
41+
owner: actions
42+
repo: setup-node
43+
path: .
44+
type: external-action
45+
external: true
46+
contentDigest: sha256:ad45f1922115116fb4706651d0a9262332bc4e4f11eb2021e09789dd1af18085
47+
dependencies: []
48+
requested: 48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e
49+
resolved: 48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e
50+
github:autofix-ci/action:
51+
source: github
52+
owner: autofix-ci
53+
repo: action
54+
path: .
55+
type: external-action
56+
external: true
57+
contentDigest: sha256:a9ebe499b43c1ca09ec1ffeeb705674235e32ae5d40444f8d136f0a6f2189e8b
58+
dependencies: []
59+
requested: c5b2d67aa2274e7b5a18224e8171550871fc7e4a
60+
resolved: c5b2d67aa2274e7b5a18224e8171550871fc7e4a
61+
github:pnpm/action-setup:
62+
source: github
63+
owner: pnpm
64+
repo: action-setup
65+
path: .
66+
type: external-action
67+
external: true
68+
contentDigest: sha256:7903b0a83562cd93df4d70181e610d9a4d6aedf76c83197208a6fdc13614d6f1
69+
dependencies: []
70+
requested: 0e279bb959325dab635dd2c09392533439d90093
71+
resolved: 0e279bb959325dab635dd2c09392533439d90093
72+
github:sxzz/workflows/.github/workflows/autofix.yml:
73+
source: github
74+
owner: sxzz
75+
repo: workflows
76+
path: .github/workflows/autofix.yml
77+
type: reusable-workflow
78+
contentDigest: sha256:d268cea9299f8e5cc5636a5273533f3538598be68554fa425e1a66798b4df00a
79+
dependencies:
80+
- package: github:sxzz/workflows/setup-js
81+
requested: main
82+
foundAt: sxzz/workflows/.github/workflows/autofix.yml#jobs.autofix.steps[0].uses
83+
- package: github:autofix-ci/action
84+
requested: c5b2d67aa2274e7b5a18224e8171550871fc7e4a
85+
foundAt: sxzz/workflows/.github/workflows/autofix.yml#jobs.autofix.steps[2].uses
86+
requested: main
87+
resolved: 2e7328a5d564218c4c647f48f1db6e7d6b90c76e
88+
github:sxzz/workflows/.github/workflows/release-commit.yml:
89+
source: github
90+
owner: sxzz
91+
repo: workflows
92+
path: .github/workflows/release-commit.yml
93+
type: reusable-workflow
94+
contentDigest: sha256:06630f463980c0f109857593e1205d302aaca93766e6337790c7f319976b9da5
95+
dependencies:
96+
- package: github:sxzz/workflows/setup-js
97+
requested: main
98+
foundAt: sxzz/workflows/.github/workflows/release-commit.yml#jobs.release.steps[0].uses
99+
requested: main
100+
resolved: 2e7328a5d564218c4c647f48f1db6e7d6b90c76e
101+
github:sxzz/workflows/.github/workflows/release.yml:
102+
source: github
103+
owner: sxzz
104+
repo: workflows
105+
path: .github/workflows/release.yml
106+
type: reusable-workflow
107+
contentDigest: sha256:716fb2eae20dfe7e87c92eabd1b4be35deeb2f6fca8f999f63412d26904abbf8
108+
dependencies:
109+
- package: github:sxzz/workflows/setup-js
110+
requested: main
111+
foundAt: sxzz/workflows/.github/workflows/release.yml#jobs.release.steps[0].uses
112+
requested: main
113+
resolved: 2e7328a5d564218c4c647f48f1db6e7d6b90c76e
114+
github:sxzz/workflows/.github/workflows/unit-test.yml:
115+
source: github
116+
owner: sxzz
117+
repo: workflows
118+
path: .github/workflows/unit-test.yml
119+
type: reusable-workflow
120+
contentDigest: sha256:0cff202ed73f1bd09e8e8727ec40aed870f0159d3d9e9e7e910bf89c369c8d3c
121+
dependencies:
122+
- package: github:sxzz/workflows/setup-js
123+
requested: main
124+
foundAt: sxzz/workflows/.github/workflows/unit-test.yml#jobs.lint.steps[0].uses
125+
requested: main
126+
resolved: 2e7328a5d564218c4c647f48f1db6e7d6b90c76e
127+
github:sxzz/workflows/setup-js:
128+
source: github
129+
owner: sxzz
130+
repo: workflows
131+
path: setup-js
132+
type: composite
133+
contentDigest: sha256:ee6696753c61e7206ab75bc50a88f8854a2ea5ceb668cbc2d813658bef7aa993
134+
dependencies:
135+
- package: github:actions/checkout
136+
requested: de0fac2e4500dabe0009e67214ff5f5447ce83dd
137+
foundAt: sxzz/workflows/setup-js#runs.steps[0].uses
138+
- package: github:pnpm/action-setup
139+
requested: 0e279bb959325dab635dd2c09392533439d90093
140+
foundAt: sxzz/workflows/setup-js#runs.steps[1].uses
141+
- package: github:actions/setup-node
142+
requested: 48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e
143+
foundAt: sxzz/workflows/setup-js#runs.steps[2].uses
144+
requested: main
145+
resolved: 2e7328a5d564218c4c647f48f1db6e7d6b90c76e

.github/workflows/autofix.yml

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,36 @@
11
name: autofix.ci
22

33
on:
4-
pull_request:
5-
6-
permissions:
7-
contents: read
4+
- pull_request
85

96
jobs:
10-
autofix:
11-
if: github.repository == 'rolldown/tsdown'
7+
autofix-autofix:
128
runs-on: ubuntu-latest
9+
permissions:
10+
contents: read
1311
steps:
14-
- name: Setup JS
15-
uses: sxzz/workflows/setup-js@340b33de8349804cfdae4f42345478516d03a973
12+
- name: Checkout
13+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
1614
with:
17-
no-frozen-lockfile: true
15+
persist-credentials: false
16+
fetch-depth: '1'
17+
18+
- name: Install pnpm
19+
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093
1820

19-
- name: Format
20-
run: pnpm run format
21+
- name: Setup node
22+
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e
23+
with:
24+
node-version: lts/*
25+
cache: pnpm
26+
registry-url: https://registry.npmjs.org
2127

22-
- name: Lint
23-
run: pnpm run lint --fix
28+
- name: Install dependencies
29+
shell: bash
30+
run: pnpm install --no-frozen-lockfile
2431

25-
- name: Update API snapshots
26-
run: pnpm build --update-snapshot
32+
- name: Fix
33+
run: pnpm run format && pnpm run lint --fix && pnpm build --update-snapshot
2734

2835
- name: Commit
29-
uses: autofix-ci/action@c5b2d67aa2274e7b5a18224e8171550871fc7e4a # v1.3.4
36+
uses: autofix-ci/action@c5b2d67aa2274e7b5a18224e8171550871fc7e4a
File renamed without changes.
File renamed without changes.

.github/workflows/release-commit.yml

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,35 @@
11
name: Publish Any Commit
2-
on: [push, pull_request]
2+
3+
on:
4+
- push
5+
- pull_request
36

47
permissions: {}
58

69
jobs:
7-
release:
8-
if: github.repository == 'rolldown/tsdown'
10+
release-release:
911
name: Release Commit
1012
runs-on: ubuntu-latest
1113
steps:
12-
- name: Setup JS
13-
uses: sxzz/workflows/setup-js@340b33de8349804cfdae4f42345478516d03a973
14+
- name: Checkout
15+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
16+
with:
17+
persist-credentials: false
18+
fetch-depth: '1'
19+
20+
- name: Install pnpm
21+
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093
22+
23+
- name: Setup node
24+
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e
25+
with:
26+
node-version: lts/*
27+
cache: pnpm
28+
registry-url: https://registry.npmjs.org
29+
30+
- name: Install dependencies
31+
shell: bash
32+
run: pnpm install
1433

1534
- name: Build
1635
run: pnpm run build

.github/workflows/release.yml

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,35 @@ name: Release
33
on:
44
push:
55
tags:
6-
- 'v*'
6+
- v*
77

88
jobs:
9-
release:
10-
if: github.repository == 'rolldown/tsdown'
9+
release-release:
1110
name: Release
1211
runs-on: ubuntu-latest
1312
permissions:
1413
contents: write
1514
id-token: write
1615
steps:
17-
- name: Setup JS
18-
uses: sxzz/workflows/setup-js@340b33de8349804cfdae4f42345478516d03a973
16+
- name: Checkout
17+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
1918
with:
20-
fetch-all: true
19+
persist-credentials: false
20+
fetch-depth: '0'
21+
22+
- name: Install pnpm
23+
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093
24+
25+
- name: Setup node
26+
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e
27+
with:
28+
node-version: lts/*
29+
cache: pnpm
30+
registry-url: https://registry.npmjs.org
31+
32+
- name: Install dependencies
33+
shell: bash
34+
run: pnpm install
2135

2236
- name: Generate GitHub Changelog
2337
run: pnpx changelogithub
@@ -29,4 +43,4 @@ jobs:
2943
run: pnpm run build
3044

3145
- name: Publish to NPM
32-
run: pnpm -r publish --access public --no-git-checks ${{ (contains(github.ref_name, 'alpha') && '--tag alpha') || (contains(github.ref_name, 'beta') && '--tag beta') || (contains(github.ref_name, 'rc') && '--tag rc') || '' }}
46+
run: ${{ format('pnpm -r publish --access public --no-git-checks {0}', (contains(github.ref_name, 'alpha') && 'alpha' || contains(github.ref_name, 'beta') && 'beta' || contains(github.ref_name, 'rc') && 'rc' || '') && format('--tag {0}', (contains(github.ref_name, 'alpha') && 'alpha' || contains(github.ref_name, 'beta') && 'beta' || contains(github.ref_name, 'rc') && 'rc' || '')) || '') }}

.github/workflows/src/autofix.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: autofix.ci
2+
3+
on: [pull_request]
4+
5+
jobs:
6+
autofix:
7+
if: github.repository == 'rolldown/tsdown'
8+
uses: sxzz/workflows/.github/workflows/autofix.yml@main
9+
with:
10+
command: pnpm run format && pnpm run lint --fix && pnpm build --update-snapshot
11+
permissions:
12+
contents: read
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Publish Any Commit
2+
on: [push, pull_request]
3+
4+
permissions: {}
5+
6+
jobs:
7+
release:
8+
if: github.repository == 'rolldown/tsdown'
9+
uses: sxzz/workflows/.github/workflows/release-commit.yml@main
10+
with:
11+
compact: true
12+
packages: ". './packages/*'"
13+
comment-package-manager: pnpm,npm,yarn
14+
comment-with-dev: true

.github/workflows/src/release.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
release:
10+
if: github.repository == 'rolldown/tsdown'
11+
uses: sxzz/workflows/.github/workflows/release.yml@main
12+
with:
13+
publish: true
14+
build: pnpm run build
15+
tag: ${{ contains(github.ref_name, 'alpha') && 'alpha' || contains(github.ref_name, 'beta') && 'beta' || contains(github.ref_name, 'rc') && 'rc' || '' }}
16+
permissions:
17+
contents: write
18+
id-token: write

0 commit comments

Comments
 (0)