Skip to content

Commit a3dfdf1

Browse files
authored
Merge pull request #9 from thisismindo/dev-state
bump dependencies
2 parents e7ae5f7 + 0c9e39d commit a3dfdf1

File tree

2 files changed

+45
-5
lines changed

2 files changed

+45
-5
lines changed

.github/workflows/action.yaml

Lines changed: 42 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,24 @@ on:
44
push:
55
branches:
66
- main
7+
tags:
8+
- 'v*'
79
pull_request:
810
branches:
911
- main
1012

1113
jobs:
1214
build:
13-
runs-on: ubuntu-latest
15+
runs-on: ${{ matrix.os }}
1416
strategy:
1517
fail-fast: false
1618
matrix:
1719
python-version: ["3.9"]
20+
os: ["ubuntu-latest"]
1821
steps:
1922
- uses: actions/checkout@v3
2023
- name: Set up Python ${{ matrix.python-version }}
21-
uses: actions/setup-python@v3
24+
uses: actions/setup-python@v4
2225
with:
2326
python-version: ${{ matrix.python-version }}
2427
- name: Install dependencies
@@ -28,3 +31,40 @@ jobs:
2831
- name: Run pylint
2932
run: |
3033
pylint src/
34+
deploy-production:
35+
name: production deployment
36+
runs-on: ${{ matrix.os }}
37+
needs: [build]
38+
if: github.ref == 'refs/heads/main'
39+
strategy:
40+
matrix:
41+
node-version: ["18.x"]
42+
os: ["ubuntu-latest"]
43+
steps:
44+
- run: |
45+
echo "@todo implement steps for production deployment"
46+
create-release:
47+
name: create release
48+
runs-on: ${{ matrix.os }}
49+
permissions: write-all
50+
needs:
51+
- build
52+
- deploy-production
53+
strategy:
54+
matrix:
55+
os: ["ubuntu-latest"]
56+
steps:
57+
- uses: actions/checkout@v3
58+
- id: get_version
59+
run: |
60+
content=`cat package.json`
61+
content="${content//'%'/'%25'}"
62+
content="${content//$'\n'/'%0A'}"
63+
content="${content//$'\r'/'%0D'}"
64+
echo "::set-output name=packageJson::$content"
65+
- name: Create a Release
66+
uses: elgohr/Github-Release-Action@v4
67+
env:
68+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
69+
with:
70+
title: ${{fromJson(steps.get_version.outputs.packageJson).version}}

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
{
22
"name": "serverless-demo",
3-
"version": "1.0.0",
3+
"version": "v1.0.0",
44
"description": "",
55
"keywords": [],
66
"author": "mindo silalahi",
77
"main": "index.js",
88
"license": "ISC",
99
"dependencies": {
10-
"serverless": "^3.34.0",
10+
"serverless": "^3.35.2",
1111
"serverless-plugin-warmup": "^8.2.1",
12-
"serverless-offline": "^12.0.4",
12+
"serverless-offline": "^13.1.1",
1313
"serverless-plugin-aws-alerts": "^1.7.5"
1414
}
1515
}

0 commit comments

Comments
 (0)