Skip to content

Commit ca034d3

Browse files
Merge pull request #20 from scribd/add-release-config
Adding semantic release.
2 parents 3cf6caf + df4cc25 commit ca034d3

File tree

3 files changed

+68
-0
lines changed

3 files changed

+68
-0
lines changed

lambdas.tf renamed to main.tf

File renamed without changes.

release.config.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
module.exports = {
2+
"plugins": [
3+
"@semantic-release/commit-analyzer",
4+
"@semantic-release/release-notes-generator",
5+
[
6+
"@semantic-release/changelog",
7+
{
8+
"changelogFile": "CHANGELOG.md"
9+
}
10+
],
11+
"@semantic-release/github",
12+
[
13+
"@semantic-release/git",
14+
{
15+
"assets": [
16+
"CHANGELOG.md"
17+
],
18+
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
19+
}
20+
]
21+
]
22+
};

workflows/terraform_and_release.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: 'CICD'
2+
on:
3+
push:
4+
branches:
5+
- $default-branch
6+
jobs:
7+
terraform:
8+
name: 'Terraform'
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: 'Checkout'
12+
uses: actions/checkout@master
13+
14+
- uses: hashicorp/setup-terraform@v1
15+
with:
16+
terraform_version: 0.13.x
17+
18+
- run: terraform fmt
19+
- run: terraform init
20+
21+
- name: 'Inject provider configs for validate command'
22+
run: |
23+
cat > providers.tf <<EOF
24+
provider "aws" {
25+
region = "us-east-2"
26+
}
27+
EOF
28+
- run: terraform validate
29+
30+
release:
31+
if: github.event_name == 'push'
32+
needs: terraform
33+
runs-on: ubuntu-latest
34+
35+
steps:
36+
- uses: actions/checkout@v2
37+
- name: Semantic Release
38+
id: semantic
39+
uses: cycjimmy/semantic-release-action@v2
40+
env:
41+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42+
with:
43+
semantic_version: 17
44+
extra_plugins: |
45+
@semantic-release/changelog
46+
@semantic-release/git

0 commit comments

Comments
 (0)