Skip to content

Commit bfd1d69

Browse files
authored
fix(ci): run release on self hosted (#137)
1 parent 2ad64ce commit bfd1d69

File tree

2 files changed

+12
-18
lines changed

2 files changed

+12
-18
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ jobs:
7070
run: pnpm typecheck
7171

7272
- name: Install xvfb and dependencies
73-
if: runner.os == 'Linux'
73+
if: ${{ runner.os == 'Linux' && runner.environment == 'self-hosted' }}
7474
run: |
7575
sudo apt-get update
7676
sudo apt-get install -y xvfb libxss1 libgtk-3-0 libgconf-2-4 libnss3 libxrandr2 libasound2 libpangocairo-1.0-0 libatk1.0-0 libcairo-gobject2 libgtk-3-0 libgdk-pixbuf2.0-0

.github/workflows/release.yml

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,10 @@ jobs:
4949
include:
5050
- goos: linux
5151
goarch: amd64
52-
runs_on: ubuntu-latest
5352
node_arch: x64
5453
node_os: linux
5554

56-
runs-on: ${{ matrix.runs_on }}
55+
runs-on: rspack-ubuntu-22.04-large
5756
steps:
5857
- name: Checkout
5958
uses: actions/checkout@v4
@@ -109,6 +108,13 @@ jobs:
109108

110109
- name: Lint code
111110
run: pnpm lint
111+
112+
- name: Install xvfb and dependencies
113+
if: ${{ runner.os == 'Linux' && runner.environment == 'self-hosted' }}
114+
run: |
115+
sudo apt-get update
116+
sudo apt-get install -y xvfb libxss1 libgtk-3-0 libgconf-2-4 libnss3 libxrandr2 libasound2 libpangocairo-1.0-0 libatk1.0-0 libcairo-gobject2 libgtk-3-0 libgdk-pixbuf2.0-0
117+
112118
- name: Test on Linux
113119
run: xvfb-run -a pnpm -r test
114120

@@ -118,7 +124,7 @@ jobs:
118124
env:
119125
release_npm: ${{ inputs.to_release == 'all' || inputs.to_release == 'npm' }}
120126
release_extension: ${{ inputs.to_release == 'all' || inputs.to_release == 'extension' }}
121-
runs-on: ubuntu-latest
127+
runs-on: rspack-ubuntu-22.04-large
122128
steps:
123129
- name: Checkout
124130
uses: actions/checkout@v4
@@ -153,7 +159,7 @@ jobs:
153159
NPM_TOKEN: ${{ secrets.RSLINT_NPM_TOKEN }}
154160
run: |
155161
npm config set "//registry.npmjs.org/:_authToken" "${NPM_TOKEN}"
156-
pnpm -r publish --dry-run --tag ${{ github.event.inputs.npm_tag }} --publish-branch ${{ github.event.inputs.branch }}
162+
pnpm -r publish --tag ${{ github.event.inputs.npm_tag }} --publish-branch ${{ github.event.inputs.branch }}
157163
158164
- name: Build and publish to Microsoft VS Code Marketplace
159165
if: false
@@ -184,36 +190,30 @@ jobs:
184190
matrix:
185191
include:
186192
- goos: darwin
187-
runs_on: macos-13
188193
goarch: amd64
189194
node_arch: x64
190195
node_os: darwin
191196
- goos: darwin
192-
runs_on: macos-latest
193197
goarch: arm64
194198
node_arch: arm64
195199
node_os: darwin
196200
- goos: linux
197201
goarch: amd64
198-
runs_on: ubuntu-latest
199202
node_arch: x64
200203
node_os: linux
201204
- goos: linux
202-
runs_on: ubuntu-latest
203205
goarch: arm64
204206
node_arch: arm64
205207
node_os: linux
206208
- goos: windows
207209
goarch: amd64
208210
node_arch: x64
209211
node_os: win32
210-
runs_on: windows-latest
211212
- goos: windows
212213
goarch: arm64
213214
node_arch: arm64
214215
node_os: win32
215-
runs_on: windows-latest
216-
runs-on: ${{ matrix.runs_on }}
216+
runs-on: rspack-ubuntu-22.04-large
217217
steps:
218218
- name: Checkout
219219
uses: actions/checkout@v4
@@ -240,15 +240,9 @@ jobs:
240240
run: pnpm install --frozen-lockfile
241241

242242
- name: Go Build packages
243-
if: matrix.node_os != 'win32'
244243
run: |
245244
GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -o ${{ matrix.node_os }}-${{ matrix.node_arch }}-rslint ./cmd/rslint
246245
247-
- name: Go Build Packages (windows)
248-
if: matrix.node_os == 'win32'
249-
run: |
250-
$env:GOOS="${{ matrix.goos }}"; $env:GOARCH="${{ matrix.goarch }}"; go build -o ${{ matrix.node_os }}-${{ matrix.node_arch }}-rslint ./cmd/rslint
251-
252246
- name: Upload artifact
253247
uses: actions/upload-artifact@v4
254248
with:

0 commit comments

Comments
 (0)