Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Release

on:
push:
branches: [master]
workflow_dispatch:

concurrency:
group: release
cancel-in-progress: false

permissions:
contents: read

env:
NODE_VERSION: '24'
SEMANTIC_RELEASE_VERSION: '25.0.9'

# Every push to master: semantic-release reads the commits since the last version tag (each one a
# squash-merged pull request's title) and, when one calls for it, tags the next version and publishes
# its GitHub release with notes. fix: makes a patch, feat: a minor, feat!: (or a BREAKING CHANGE:
# footer) a major; chore, ci, docs, refactor and test release nothing. Nothing is committed back.
jobs:
release:
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: write
issues: write
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@v7
with:
fetch-depth: 0

- name: Setup Node
uses: actions/setup-node@v7
with:
node-version: ${{ env.NODE_VERSION }}

- name: Release
run: npx --yes "semantic-release@${SEMANTIC_RELEASE_VERSION}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
17 changes: 17 additions & 0 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"branches": [
"master"
],
"tagFormat": "v${version}",
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
[
"@semantic-release/github",
{
"successCommentCondition": false,
"failCommentCondition": false
}
]
]
}
27 changes: 26 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,26 @@
# aws-tf-modules
# aws-tf-modules

Terraform modules for AWS, one per folder. Each folder's README shows how to use it.

## Versions

A project pins a released version in the module's `source`:

```hcl
module "static_site" {
source = "github.com/script47/aws-tf-modules//static-site?ref=v1.26.0"
}
```

A project changes only when it moves to a new version.

Releases are automatic. Each pull request is squash-merged, and its title, written as a [conventional commit](https://www.conventionalcommits.org), decides the next version:

| Title starts with | Version |
|---|---|
| `fix:` | patch (x.y.**z**) |
| `feat:` | minor (x.**y**.0) |
| `feat!:` | major (**x**.0.0), for a change that projects must adapt to |
| `chore:`, `ci:`, `docs:`, `refactor:`, `test:` | no release |

On the merge, the Release workflow tags the version and publishes its GitHub release, whose notes list the changes.
1 change: 1 addition & 0 deletions static-site/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ This module allows you to setup a static site with the following features:
- Automatic DNS validation for ACM via Route 53
- Optional creation of Route 53 Hosted Zone (or reuse an existing one)
- Multi-domain support
- Automatic gzip compression of text files (JS, CSS, HTML, JSON, SVG)
- Fallback support for SPA (`403 → 200 /index.html` and `404 → 200 /index.html`)
- Resource tagging for manageable resources

Expand Down
3 changes: 3 additions & 0 deletions static-site/cloudfront.tf
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ resource "aws_cloudfront_distribution" "this" {
}

viewer_protocol_policy = "redirect-to-https"

# Gzip only: Brotli needs a cache policy in place of forwarded_values.
compress = true
}

custom_error_response {
Expand Down
Loading