Skip to content

Commit d2740a2

Browse files
chore: Update GitHub Actions workflow
1 parent c1ccf2f commit d2740a2

File tree

2 files changed

+37
-35
lines changed

2 files changed

+37
-35
lines changed

.github/workflows/main.yml

Lines changed: 36 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
name: Deploy to npm
22

33
on:
4+
pull_request:
5+
branches:
6+
- main
47
workflow_dispatch:
5-
branches: [main]
6-
push:
7-
branches: [main]
88

99
permissions:
1010
id-token: write
@@ -275,35 +275,36 @@ jobs:
275275
- name: Test - observable mode
276276
run: OBSERVABLE_MODE=true DISABLE_PARALLEL_DEPLOY=true npx vitest --retry 1 test/terraform-basic.test.ts
277277

278-
# publish:
279-
# needs:
280-
# - test-cdk-basic
281-
# - test-sls-basic
282-
# - test-sls-esbuild-cjs
283-
# - test-sls-esbuild-esm
284-
# - test-sam-basic
285-
# - test-terraform-basic
286-
# runs-on: ubuntu-latest
287-
# concurrency:
288-
# group: publish
289-
# steps:
290-
# - uses: actions/checkout@v4
291-
# - name: Use Node.js
292-
# uses: actions/setup-node@v4
293-
# with:
294-
# node-version: "20"
295-
# registry-url: "https://registry.npmjs.org"
296-
# - name: Install dependencies
297-
# run: npm ci
298-
# - uses: actions/download-artifact@v4
299-
# with:
300-
# name: dist
301-
# path: dist
302-
# - name: Semantic Release
303-
# run: |
304-
# npm whoami
305-
# npx semantic-release
306-
# env:
307-
# GITHUB_TOKEN: ${{ secrets.PRIVATE_GITHUB_TOKEN }}
308-
# NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
309-
# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
278+
publish:
279+
needs:
280+
- test-cdk-basic
281+
- test-sls-basic
282+
- test-sls-esbuild-cjs
283+
- test-sls-esbuild-esm
284+
- test-sam-basic
285+
- test-terraform-basic
286+
if: github.event_name == 'workflow_dispatch'
287+
runs-on: ubuntu-latest
288+
concurrency:
289+
group: publish
290+
steps:
291+
- uses: actions/checkout@v4
292+
- name: Use Node.js
293+
uses: actions/setup-node@v4
294+
with:
295+
node-version: "20"
296+
registry-url: "https://registry.npmjs.org"
297+
- name: Install dependencies
298+
run: npm ci
299+
- uses: actions/download-artifact@v4
300+
with:
301+
name: dist
302+
path: dist
303+
- name: Semantic Release
304+
run: |
305+
npm whoami
306+
npx semantic-release
307+
env:
308+
GITHUB_TOKEN: ${{ secrets.PRIVATE_GITHUB_TOKEN }}
309+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
310+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

_config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
theme: jekyll-theme-primer

0 commit comments

Comments
 (0)