Skip to content

Commit 433911b

Browse files
committed
Fix builds / release github actions
This will mostly run all the actions on push / pr too.
1 parent 1b97ebf commit 433911b

File tree

5 files changed

+15
-37
lines changed

5 files changed

+15
-37
lines changed

.github/workflows/build-docker.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ name: Docker Build
33
on:
44
push:
55
branches:
6-
- 'master'
6+
- "**"
77
tags:
8-
- "*"
8+
- "**"
99
jobs:
1010
docker:
1111
runs-on: ubuntu-latest
@@ -14,11 +14,8 @@ jobs:
1414
- uses: actions/setup-node@v3
1515
with:
1616
node-version: 18.x
17-
- uses: aws-actions/setup-sam@v2
18-
with:
19-
use-installer: true
2017
- run: npm install
21-
- run: npm run build
18+
- run: npx tsc
2219
- name: Docker meta
2320
id: meta
2421
uses: docker/metadata-action@v3
@@ -36,6 +33,7 @@ jobs:
3633
username: ${{ secrets.DOCKERHUB_USERNAME }}
3734
password: ${{ secrets.DOCKERHUB_TOKEN }}
3835
- name: Build and push latest
36+
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')
3937
uses: docker/build-push-action@v2
4038
with:
4139
file: Dockerfile

.github/workflows/build.yml

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

.github/workflows/release.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ name: Release
33
on:
44
push:
55
tags:
6-
- "*"
6+
- "**"
7+
branches:
8+
- '**'
79

810
jobs:
911
build:
@@ -21,7 +23,12 @@ jobs:
2123
- run: npm run build
2224
- run: npm run build-zip
2325
- uses: softprops/action-gh-release@v1
26+
if: github.event_name == 'pull_request'
2427
with:
2528
files: lambda.zip
2629
name: lambda
27-
30+
- uses: actions/upload-artifact@v3
31+
if: github.event_name == 'push' && github.ref_type == 'tag'
32+
with:
33+
path: lambda.zip
34+
name: lambda

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Test
22

33
on:
4-
pull_request:
4+
push:
55
branches:
66
- '**'
77

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
"target": "es2020",
44
"strict": true,
55
"preserveConstEnums": true,
6-
"noEmit": true,
76
"sourceMap": false,
87
"module": "ES2022",
98
"moduleResolution": "node",
@@ -13,6 +12,7 @@
1312
"isolatedModules": true,
1413
"types": ["node"],
1514
"resolveJsonModule": true,
15+
"outDir": "dist"
1616
},
1717
"exclude": ["node_modules"],
1818
"include": ["./src/**/*.ts", "./*.d.ts", "./tests/**/*.ts"],

0 commit comments

Comments
 (0)